HasException checks if the context has an exception set.
()
| 1241 | |
| 1242 | // HasException checks if the context has an exception set. |
| 1243 | func (ctx *Context) HasException() bool { |
| 1244 | if !ctx.hasValidRef() { |
| 1245 | return false |
| 1246 | } |
| 1247 | // Check if the context has an exception set |
| 1248 | return bool(C.JS_HasException(ctx.ref)) |
| 1249 | } |
| 1250 | |
| 1251 | func (ctx *Context) exceptionError() error { |
| 1252 | val := &Value{ctx: ctx, ref: C.JS_GetException(ctx.ref)} |