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

@Override
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

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

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

String details

public @Override String details()

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