Class EcmaError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mozilla.javascript.RhinoException
org.mozilla.javascript.EcmaError
- All Implemented Interfaces:
Serializable
The class of exceptions raised by the engine as described in
ECMA edition 3. See section 15.11.6 in particular.
- See Also:
-
Field Summary
FieldsFields inherited from class RhinoException
interpreterLineData, interpreterStackInfo
-
Constructor Summary
ConstructorsConstructorDescriptionEcmaError
(String errorName, String errorMessage, String sourceName, int lineNumber, String lineSource, int columnNumber) Create an exception with the specified detail message.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
Modifier and TypeMethodDescriptiondetails()
int
Deprecated.UseRhinoException.columnNumber()
from the super class.Gets the message corresponding to the error.Deprecated.Always returns null.int
Deprecated.UseRhinoException.lineNumber()
from the super class.Deprecated.UseRhinoException.lineSource()
from the super class.getName()
Gets the name of the error.Deprecated.UseRhinoException.sourceName()
from the super class.Methods inherited from class RhinoException
columnNumber, formatStackTrace, getMessage, getScriptStack, getScriptStack, getScriptStackTrace, getScriptStackTrace, getScriptStackTrace, getStackStyle, initColumnNumber, initLineNumber, initLineSource, initSourceName, lineNumber, lineSource, printStackTrace, printStackTrace, recordErrorOrigin, setStackStyle, sourceName, useMozillaStackStyle, usesMozillaStackStyle
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
errorName
-
errorMessage
-
-
Constructor Details
-
EcmaError
EcmaError(String errorName, String errorMessage, String sourceName, int lineNumber, String lineSource, int columnNumber) Create an exception with the specified detail message. Errors internal to the JavaScript engine will simply throw a RuntimeException.- Parameters:
sourceName
- the name of the source responsible for the errorlineNumber
- the line number of the sourcelineSource
- the source of the line containing the error (may be null if unknown)columnNumber
- the columnNumber of the source (may be zero if unknown)
-
EcmaError
@Deprecated 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
-
details
- Overrides:
details
in classRhinoException
-
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.
-
getErrorMessage
Gets the message corresponding to the error. See ECMA edition 3, 15.11.7.10.- Returns:
- an implementation-defined string describing the error.
-
getSourceName
Deprecated.UseRhinoException.sourceName()
from the super class. -
getLineNumber
Deprecated.UseRhinoException.lineNumber()
from the super class. -
getColumnNumber
Deprecated.UseRhinoException.columnNumber()
from the super class. -
getLineSource
Deprecated.UseRhinoException.lineSource()
from the super class. -
getErrorObject
Deprecated.Always returns null.
-