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

Function throwModuleError

error_bridge.go:46–51  ·  view source on GitHub ↗

throwModuleError creates and throws a module initialization error.

(ctx *C.JSContext, err error)

Source from the content-addressed store, hash-verified

44
45// throwModuleError creates and throws a module initialization error.
46func throwModuleError(ctx *C.JSContext, err error) C.int {
47 errorMsg := C.CString(err.Error())
48 C.ThrowInternalError(ctx, errorMsg)
49 C.free(unsafe.Pointer(errorMsg))
50 return C.int(-1)
51}

Callers 1

goModuleInitProxyFunction · 0.85

Calls 2

ThrowInternalErrorMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected