Class EcmaError

  • All Implemented Interfaces:

    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
    • Constructor Detail

      • EcmaError

        public EcmaError​(Scriptable nativeError,
                         java.lang.String sourceName,
                         int lineNumber,
                         int columnNumber,
                         java.lang.String lineSource)
        EcmaError error instances should not be constructed explicitly since they are generated by the engine.
    • Method Detail

      • 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,
        the name of the error.
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Gets the message corresponding to the error. See ECMA edition 3,
        an implementation-defined string describing the error.
      • getSourceName

        public java.lang.String getSourceName()
        Use RhinoException.sourceName() from the super class.
      • getLineSource

        public java.lang.String getLineSource()
        Use RhinoException.lineSource() from the super class.
      • getErrorObject

        public Scriptable getErrorObject()
        Always returns null.