forked from mirror/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
317 B
11 lines
317 B
7 years ago
|
package duktape
|
||
|
|
||
|
// Must returns existing *Context or throw panic.
|
||
|
// It is highly recommended to use Must all the time.
|
||
|
func (d *Context) Must() *Context {
|
||
|
if d.duk_context == nil {
|
||
|
panic("[duktape] Context does not exists!\nYou cannot call any contexts methods after `DestroyHeap()` was called.")
|
||
|
}
|
||
|
return d
|
||
|
}
|