Class ScriptError

    • Constructor Detail

      • ScriptError

        public ScriptError​(String message,
                           int line,
                           int column,
                           int length)
        Creates new ScriptError.
        Parameters:
        message - Error Message
        line - Line number, or -1 if unknown
        column - Column number, or -1 if unknown
        length - Length, or -1 if unknown
      • ScriptError

        public ScriptError​(String message,
                           org.eclipse.emf.ecore.EObject atEObject)
        Creates new ScriptError. This constructor uses the given EObject instance to calculate the exact position.
        Parameters:
        message - Error Message
        atEObject - the EObject instance to use for calculating the position
    • Method Detail

      • getMessage

        public String getMessage()
        Returns a message containing the String passed to a constructor as well as line and column numbers if any of these are known.
        Returns:
        The error message.
      • getLineNumber

        public int getLineNumber()
        Get the line number on which an error occurred.
        Returns:
        The line number. Returns -1 if a line number is unavailable.
      • getColumnNumber

        public int getColumnNumber()
        Get the column number on which an error occurred.
        Returns:
        The column number. Returns -1 if a column number is unavailable.
      • getLength

        public int getLength()
        Get the number of columns affected by the error.
        Returns:
        The number of columns. Returns -1 if unavailable.