Package org.htmlunit.corejs.javascript
Class EcmaError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.htmlunit.corejs.javascript.RhinoException
-
- org.htmlunit.corejs.javascript.EcmaError
-
- All Implemented Interfaces:
java.io.Serializable
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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
errorMessage
private java.lang.String
errorName
private static long
serialVersionUID
-
Fields inherited from class org.htmlunit.corejs.javascript.RhinoException
interpreterLineData, interpreterStackInfo
-
-
Constructor Summary
Constructors Constructor Description EcmaError(java.lang.String errorName, java.lang.String errorMessage, java.lang.String sourceName, int lineNumber, java.lang.String lineSource, int columnNumber)
Create an exception with the specified detail message.EcmaError(Scriptable nativeError, java.lang.String sourceName, int lineNumber, int columnNumber, java.lang.String lineSource)
Deprecated.EcmaError error instances should not be constructed explicitly since they are generated by the engine.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
details()
int
getColumnNumber()
Deprecated.UseRhinoException.columnNumber()
from the super class.java.lang.String
getErrorMessage()
Gets the message corresponding to the error.Scriptable
getErrorObject()
Deprecated.Always returns null.int
getLineNumber()
Deprecated.UseRhinoException.lineNumber()
from the super class.java.lang.String
getLineSource()
Deprecated.UseRhinoException.lineSource()
from the super class.java.lang.String
getName()
Gets the name of the error.java.lang.String
getSourceName()
Deprecated.UseRhinoException.sourceName()
from the super class.-
Methods inherited from class org.htmlunit.corejs.javascript.RhinoException
columnNumber, formatStackTrace, getMessage, getScriptStack, getScriptStack, getScriptStackTrace, getScriptStackTrace, getScriptStackTrace, getStackStyle, initColumnNumber, initLineNumber, initLineSource, initSourceName, lineNumber, lineSource, printStackTrace, printStackTrace, recordErrorOrigin, setStackStyle, sourceName, useMozillaStackStyle, usesMozillaStackStyle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
errorName
private java.lang.String errorName
-
errorMessage
private java.lang.String errorMessage
-
-
Constructor Detail
-
EcmaError
EcmaError(java.lang.String errorName, java.lang.String errorMessage, java.lang.String sourceName, int lineNumber, java.lang.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 sourcecolumnNumber
- the columnNumber of the source (may be zero if unknown)lineSource
- the source of the line containing the error (may be null if unknown)
-
EcmaError
@Deprecated public EcmaError(Scriptable nativeError, java.lang.String sourceName, int lineNumber, int columnNumber, java.lang.String lineSource)
Deprecated.EcmaError error instances should not be constructed explicitly since they are generated by the engine.
-
-
Method Detail
-
details
public java.lang.String details()
- Overrides:
details
in classRhinoException
-
getName
public java.lang.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.
-
getErrorMessage
public java.lang.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.
-
getSourceName
@Deprecated public java.lang.String getSourceName()
Deprecated.UseRhinoException.sourceName()
from the super class.
-
getLineNumber
@Deprecated public int getLineNumber()
Deprecated.UseRhinoException.lineNumber()
from the super class.
-
getColumnNumber
@Deprecated public int getColumnNumber()
Deprecated.UseRhinoException.columnNumber()
from the super class.
-
getLineSource
@Deprecated public java.lang.String getLineSource()
Deprecated.UseRhinoException.lineSource()
from the super class.
-
getErrorObject
@Deprecated public Scriptable getErrorObject()
Deprecated.Always returns null.
-
-