Class
JSError
public final class JSError: Error, JSBridgedClass
A wrapper around the JavaScript Error
class that
exposes its properties in a type-safe way.
Relationships
Conforms To
JSBridgedClass
Conform to this protocol when your Swift class wraps a JavaScript class.
CustomStringConvertible
Error
Initializers
init(message:)
public init(message: String)
Creates a new instance of the JavaScript Error
class with a given message.
init(unsafelyWrapping:)
public init(unsafelyWrapping jsObject: JSObject)
Properties
constructor
public static let constructor = JSObject.global.Error.function
The constructor function used to create new JavaScript Error
objects.
name
public var name: String
The name (usually corresponds to the name of the underlying class) of a given error.
stack
public var stack: String?
The JavaScript call stack that led to the creation of this error object.