blob: 86191239bc42ccdc84ae5b38066f8cfecf319e9d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
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
}
|