org.mozilla.javascript

Class EcmaError


public class EcmaError
extends RhinoException

The class of exceptions raised by the engine as described in ECMA edition 3. See section 15.11.6 in particular.

Constructor Summary

EcmaError(Scriptable nativeError, String sourceName, int lineNumber, int columnNumber, String lineSource)
Deprecated. EcmaError error instances should not be constructed explicitly since they are generated by the engine.

Method Summary

@Override
String details()
int
getColumnNumber()
Deprecated. Use RhinoException.columnNumber() from the super class.
String
getErrorMessage()
Gets the message corresponding to the error.
Scriptable
getErrorObject()
Deprecated. Always returns null.
int
getLineNumber()
Deprecated. Use RhinoException.lineNumber() from the super class.
String
getLineSource()
Deprecated. Use RhinoException.lineSource() from the super class.
String
getName()
Gets the name of the error.
String
getSourceName()
Deprecated. Use RhinoException.sourceName() from the super class.

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

EcmaError

public EcmaError(Scriptable nativeError,
                 String sourceName,
                 int lineNumber,
                 int columnNumber,
                 String lineSource)

Deprecated. EcmaError error instances should not be constructed explicitly since they are generated by the engine.

Method Details

String details

public @Override String details()

getColumnNumber

public int getColumnNumber()

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


getErrorMessage

public String getErrorMessage()
Gets the message corresponding to the error. See ECMA edition 3, 15.11.7.10.
Returns:
an implementation-defined string describing the error.

getErrorObject

public Scriptable getErrorObject()

Deprecated. Always returns null.


getLineNumber

public int getLineNumber()

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


getLineSource

public String getLineSource()

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


getName

public String getName()
Gets the name of the error. ECMA edition 3 defines the following errors: EvalError, RangeError, ReferenceError, SyntaxError, TypeError, and URIError. Additional error names may be added in the future. See ECMA edition 3, 15.11.7.9.
Returns:
the name of the error.

getSourceName

public String getSourceName()

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