JSException.create constructor

JSException.create(
  1. JSContext context, [
  2. JSValue? error
])

Implementation

factory JSException.create(JSContext context, [JSValue? error]) {
  final Pointer<JSValueRef> ref = calloc.call(1);
  ref.value = error?.ref ?? nullptr;
  return JSException(context, ref);
}