public class JSError extends JSObject
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(JSContext ctx,
java.lang.String message,
java.lang.String filename,
java.lang.Integer lineNumber)
Deprecated.
|
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, callAsFunction, callAsFunction, callAsFunction, callAsFunction, 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, java.lang.String message)
ctx
- The context in which to create the errormessage
- The description of the errorJSException
public JSError(JSContext ctx)
ctx
- The context in which to create the errorJSException
public JSError(JSValue error)
error
- the JavaScript Error object@Deprecated public JSError(JSContext ctx, java.lang.String message, java.lang.String filename, java.lang.Integer lineNumber) throws JSException
ctx
- The context in which to create the errormessage
- The description of the errorfilename
- The name of the file in which the error occurred. This is used for stack
tracing and is optional.lineNumber
- The line number where the error occurred. This is used for stack tracing
and is optional.JSException
public java.lang.String stack()
public java.lang.String message()
public java.lang.String name()