Contents

init(newErrorFromMessage:in:)

Creates a JavaScript error value with the specified error message.

Declaration

init!(newErrorFromMessage message: String!, in context: JSContext!)

Parameters

  • message:

    The error message for the error object.

  • context:

    The JavaScript context in which to create the value.

Return Value

A new JavaScript error value.

Discussion

Calling this method creates a JavaScript Error object, and is equivalent to calling the Error constructor (for example, new Error("message")) in JavaScript.

See Also

Creating JavaScript Values