Class XExpression

All Implemented Interfaces:
Serializable

public class XExpression extends Exception
This is the base class for all exceptions that can occurs using the Expression Class.
See Also:
  • Constructor Details

    • XExpression

      public XExpression(String errorMessage)
      Main constructor with customized message
      Parameters:
      errorMessage - customized error message
    • XExpression

      public XExpression(String errorMessage, Throwable cause)
      Main constructor with no start / end position and customized message with Throwable
      Parameters:
      errorMessage - customized error message
      cause - throwable passed through
    • XExpression

      public XExpression(int startPosition, String errorMessage)
      Main constructor with start position and customized message
      Parameters:
      startPosition - start position of the error
      errorMessage - customized error message
    • XExpression

      public XExpression(int startPosition, int endPosition, String errorMessage)
      Main constructor with start / end position and customized message
      Parameters:
      startPosition - start position of the error
      endPosition - end position of the error
      errorMessage - customized error message
  • Method Details

    • getStartPosition

      public int getStartPosition()
      Gets the start position where the error occurred.
      Returns:
      the position of the problem.
    • getEndPosition

      public int getEndPosition()
      Gets the end position where the error occurred.
      Returns:
      the end position of the problem
    • getSourceElement

      public String getSourceElement()
      Gets the source element of the error
      Returns:
      source element of the problem
    • setSourceElement

      public void setSourceElement(String sourceElement)
      Sets the source element of the error
      Parameters:
      sourceElement - to be set