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

Method HasException

context.go:1243–1249  ·  view source on GitHub ↗

HasException checks if the context has an exception set.

()

Source from the content-addressed store, hash-verified

1241
1242// HasException checks if the context has an exception set.
1243func (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
1251func (ctx *Context) exceptionError() error {
1252 val := &Value{ctx: ctx, ref: C.JS_GetException(ctx.ref)}

Callers 7

TestContextErrorHandlingFunction · 0.95
ExceptionMethod · 0.95
evalIntMethod · 0.80
evalStringMethod · 0.80

Calls 1

hasValidRefMethod · 0.95