Overview | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.javascript
Class EcmaError

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--java.lang.RuntimeException
                        |
                        +--org.mozilla.javascript.EcmaError

All Implemented Interfaces:
  java.io.Serializable

public class EcmaError
extends java.lang.RuntimeException

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

Constructor Summary
`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
`int` | `getColumnNumber()` The column number of the location of the error, or zero if unknown.
`Scriptable` | `getErrorObject()` Deprecated. Always returns result of `Context.getUndefinedValue()`.
`int` | `getLineNumber()` Returns the line number of the statement causing the error, or zero if not available.
`java.lang.String` | `getLineSource()` The source of the line causing the error, or zero if unknown.
`java.lang.String` | `getMessage()` Gets the message corresponding to the error.
`java.lang.String` | `getName()` Gets the name of the error.
`java.lang.String` | `getSourceName()` Get the name of the source containing the error, or null if that information is not available.
`java.lang.String` | `toString()` Return a string representation of the error, which currently consists of the name of the error together with the message.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### EcmaError

    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

### toString

    public java.lang.String toString()

  Return a string representation of the error, which currently consists of the name of the error together with the message.
  Overrides:
    `toString` in class `java.lang.Throwable`

### 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.

### getMessage

    public java.lang.String getMessage()

  Gets the message corresponding to the error. See ECMA edition 3, 15.11.7.10.
  Overrides:
    `getMessage` in class `java.lang.Throwable`
  Returns:
    an implemenation-defined string describing the error.

### getSourceName

    public java.lang.String getSourceName()

  Get the name of the source containing the error, or null if that information is not available.

### getLineNumber

    public int getLineNumber()

  Returns the line number of the statement causing the error, or zero if not available.

### getColumnNumber

    public int getColumnNumber()

  The column number of the location of the error, or zero if unknown.

### getLineSource

    public java.lang.String getLineSource()

  The source of the line causing the error, or zero if unknown.

### getErrorObject

    public Scriptable getErrorObject()

  Deprecated. Always returns result of `Context.getUndefinedValue()`.

Overview | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD