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)
Deprecated. Use WrappedException.WrappedException(Throwable) to report exceptions in Java code.
JavaScriptException(Object value, String sourceName, int lineNumber)
Create a JavaScript exception wrapping the given JavaScript value

Method Summary

String
details()
int
getLineNumber()
Deprecated. Use RhinoException.lineNumber() from the super class.
String
getSourceName()
Deprecated. Use RhinoException.sourceName() from the super class.
Object
getValue()

Methods inherited from class org.mozilla.javascript.RhinoException

columnNumber, details, getMessage, initColumnNumber, initLineNumber, initLineSource, initSourceName, lineNumber, lineSource, printStackTrace, printStackTrace, sourceName

Constructor Details

JavaScriptException

public JavaScriptException(Object value)

Deprecated. Use 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 Details

details

public String details()
Overrides:
details in interface RhinoException

getLineNumber

public int getLineNumber()

Deprecated. Use RhinoException.lineNumber() from the super class.


getSourceName

public String getSourceName()

Deprecated. Use RhinoException.sourceName() from the super class.


getValue

public Object getValue()
Returns:
the value wrapped by this exception