public class JSException
extends java.lang.RuntimeException
Constructor and Description |
---|
JSException(JSContext ctx,
java.lang.String message)
Creates a JavaScriptCore exception from a string message
|
JSException(JSValue error)
Creates a Java exception from a thrown JavaScript exception
|
Modifier and Type | Method and Description |
---|---|
JSError |
getError()
Gets the JSValue of the thrown exception
|
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
|
java.lang.String |
toString() |
public JSException(JSValue error)
error
- The JSValue thrown by the JavaScriptCore enginepublic JSException(JSContext ctx, java.lang.String message)
ctx
- The JSContext in which to create the exceptionmessage
- The exception meessagepublic JSError getError()
public java.lang.String stack()
public java.lang.String name()
public java.lang.String toString()
toString
in class java.lang.Throwable