org.mozilla.javascript
Class JavaScriptException
Exception
org.mozilla.javascript.JavaScriptException
public class JavaScriptException
extends Exception
Java reflection of JavaScript exceptions.
Instances of this class are thrown by the JavaScript 'throw' keyword.
- Mike McCabe
int | getLineNumber() - Returns the line number of the statement causing the error,
or zero if not available.
|
String | getSourceName() - Get the name of the source containing the error, or null
if that information is not available.
|
Object | getValue()
|
JavaScriptException
public JavaScriptException(Object value,
String sourceName,
int lineNumber)
Create a JavaScript exception wrapping the given JavaScript value
value
- the JavaScript value thrown.
getLineNumber
public int getLineNumber()
Returns the line number of the statement causing the error,
or zero if not available.
getSourceName
public String getSourceName()
Get the name of the source containing the error, or null
if that information is not available.
getValue
public Object getValue()
- the value wrapped by this exception