org.mozilla.javascript

Class JavaScriptException

public class JavaScriptException extends RhinoException

Java reflection of JavaScript exceptions. Instances of this class are thrown by the JavaScript 'throw' keyword.

Author: Mike McCabe

Constructor Summary
JavaScriptException(Object value)
JavaScriptException(Object value, String sourceName, int lineNumber)
Create a JavaScript exception wrapping the given JavaScript value
Method Summary
Stringdetails()
intgetLineNumber()
StringgetSourceName()
ObjectgetValue()

Constructor Detail

JavaScriptException

public JavaScriptException(Object value)

Deprecated: Use {@link WrappedException#WrappedException(Throwable)} to report exceptions in Java code.

JavaScriptException

public JavaScriptException(Object value, String sourceName, int lineNumber)
Create a JavaScript exception wrapping the given JavaScript value

Parameters: value the JavaScript value thrown.

Method Detail

details

public String details()

getLineNumber

public int getLineNumber()

Deprecated: Use {@link RhinoException#lineNumber()} from the super class.

getSourceName

public String getSourceName()

Deprecated: Use {@link RhinoException#sourceName()} from the super class.

getValue

public Object getValue()

Returns: the value wrapped by this exception