org.mozilla.javascript
Class JavaScriptException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.mozilla.javascript.RhinoException
                  extended by org.mozilla.javascript.JavaScriptException
All Implemented Interfaces:
java.io.Serializable

public class JavaScriptException
extends RhinoException

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

Author:
Mike McCabe
See Also:
Serialized Form

Constructor Summary
JavaScriptException(java.lang.Object value)
          Deprecated. Use WrappedException.WrappedException(Throwable) to report exceptions in Java code.
JavaScriptException(java.lang.Object value, java.lang.String sourceName, int lineNumber)
          Create a JavaScript exception wrapping the given JavaScript value
 
Method Summary
 java.lang.String details()
           
 int getLineNumber()
          Deprecated. Use RhinoException.lineNumber() from the super class.
 java.lang.String getSourceName()
          Deprecated. Use RhinoException.sourceName() from the super class.
 java.lang.Object getValue()
           
 
Methods inherited from class org.mozilla.javascript.RhinoException
columnNumber, getMessage, getScriptStack, getScriptStackTrace, getScriptStackTrace, initColumnNumber, initLineNumber, initLineSource, initSourceName, lineNumber, lineSource, printStackTrace, printStackTrace, sourceName, useMozillaStackStyle, usesMozillaStackStyle
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaScriptException

public JavaScriptException(java.lang.Object value)
Deprecated. Use WrappedException.WrappedException(Throwable) to report exceptions in Java code.


JavaScriptException

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

Parameters:
value - the JavaScript value thrown.
Method Detail

details

public java.lang.String details()
Overrides:
details in class RhinoException

getValue

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

getSourceName

public java.lang.String getSourceName()
Deprecated. Use RhinoException.sourceName() from the super class.


getLineNumber

public int getLineNumber()
Deprecated. Use RhinoException.lineNumber() from the super class.