public class JSError extends JSObject
JSObject.jsexport, JSObject.Property<T>
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly
Constructor and Description |
---|
JSError(JSContext ctx)
Generates a JavaScript throwable exception object
|
JSError(JSContext ctx,
java.lang.String message)
Generates a JavaScript throwable exception object
|
JSError(JSValue error)
Constructs a JSError from a JSValue.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
message()
JavaScript error message, see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message
|
java.lang.String |
name()
JavaScript error name, see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name
|
java.lang.String |
stack()
JavaScript error stack trace, see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
|
__nullFunc, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
equals, getContext, isArray, isBoolean, isDate, isEqual, isInstanceOfConstructor, isNull, isNumber, isObject, isStrictEqual, isString, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toJSON, toNumber, toObject, toString, valueRef
public JSError(JSContext ctx, @NonNull java.lang.String message)
ctx
- The context in which to create the errormessage
- The description of the errorpublic JSError(JSContext ctx)
ctx
- The context in which to create the errorpublic JSError(JSValue error)
error
- the JavaScript Error objectpublic java.lang.String stack()
public java.lang.String message()
public java.lang.String name()