JSObject.makeError constructor
JSObject.makeError(
- JSContext context,
- JSValuePointer arguments, {
- JSValuePointer? exception,
Creates a JavaScript Error object, as if by invoking the built-in Error constructor.
arguments
(JSValueRef[]) A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0.
exception
(JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
Implementation
JSObject.makeError(
this.context,
JSValuePointer arguments, {
JSValuePointer? exception,
}) : this.pointer = JSObjectRef.jSObjectMakeError(
context.pointer,
arguments.count,
arguments.pointer,
(exception ?? JSValuePointer(nullptr)).pointer);