MCPcopy Create free account
hub / github.com/buke/quickjs-go / exceptionError

Method exceptionError

context.go:1251–1258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1249}
1250
1251func (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.
1261func (ctx *Context) Exception() error {

Callers 1

ExceptionMethod · 0.95

Calls 3

FreeMethod · 0.95
ErrorMethod · 0.95
NewMethod · 0.80

Tested by

no test coverage detected