org.mozilla.javascript
Class EcmaError
RuntimeException
org.mozilla.javascript.EcmaError
public class EcmaError
extends RuntimeException
The class of exceptions raised by the engine as described in
ECMA edition 3. See section 15.11.6 in particular.
EcmaError(Scriptable nativeError, String sourceName, int lineNumber, int columnNumber, String lineSource) - EcmaError error instances should not be constructed
explicitly since they are generated by the engine.
|
int | getColumnNumber() - The column number of the location of the error, or zero if unknown.
|
Scriptable | getErrorObject() - Always returns result of
Context.getUndefinedValue() .
|
int | getLineNumber() - Returns the line number of the statement causing the error,
or zero if not available.
|
String | getLineSource() - The source of the line causing the error, or zero if unknown.
|
String | getMessage() - Gets the message corresponding to the error.
|
String | getName() - Gets the name of the error.
|
String | getSourceName() - Get the name of the source containing the error, or null
if that information is not available.
|
String | toString() - Return a string representation of the error, which currently consists
of the name of the error together with the message.
|
EcmaError
public EcmaError(Scriptable nativeError,
String sourceName,
int lineNumber,
int columnNumber,
String lineSource)
EcmaError error instances should not be constructed
explicitly since they are generated by the engine.
getColumnNumber
public int getColumnNumber()
The column number of the location of the error, or zero if unknown.
getLineNumber
public int getLineNumber()
Returns the line number of the statement causing the error,
or zero if not available.
getLineSource
public String getLineSource()
The source of the line causing the error, or zero if unknown.
getMessage
public String getMessage()
Gets the message corresponding to the error.
See ECMA edition 3, 15.11.7.10.
- an implemenation-defined string describing the error.
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.
- the name of the error.
getSourceName
public String getSourceName()
Get the name of the source containing the error, or null
if that information is not available.
toString
public String toString()
Return a string representation of the error, which currently consists
of the name of the error together with the message.