Contents

JSObjectMakeError(_:_:_:_:)

Creates a JavaScript error object as though invoking the built-in error constructor.

Declaration

func JSObjectMakeError(_ ctx: JSContextRef!, _ argumentCount: Int, _ arguments: UnsafePointer<JSValueRef?>!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> JSObjectRef!

Parameters

  • ctx:

    The execution context to use.

  • argumentCount:

    An integer count of the number of arguments in arguments.

  • arguments:

    A Jsvalueref array of arguments to pass to the Error constructor. Pass NULL if argumentCount is 0.

  • exception:

    A pointer to a Jsvalueref to store an exception in, if any. Pass NULL to discard any exception.

Return Value

A JSObjectRef that is an error.

See Also

Working with Objects