()
| 1249 | } |
| 1250 | |
| 1251 | func (ctx *Context) exceptionError() error { |
| 1252 | val := &Value{ctx: ctx, ref: C.JS_GetException(ctx.ref)} |
| 1253 | defer val.Free() |
| 1254 | if err := val.Error(); err != nil { |
| 1255 | return err |
| 1256 | } |
| 1257 | return errors.New("javascript exception") |
| 1258 | } |
| 1259 | |
| 1260 | // Exception returns a context's exception value. |
| 1261 | func (ctx *Context) Exception() error { |