throwModuleError creates and throws a module initialization error.
(ctx *C.JSContext, err error)
| 44 | |
| 45 | // throwModuleError creates and throws a module initialization error. |
| 46 | func 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 | } |
no test coverage detected