Class ParseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CheckPointedParseException

public class ParseException extends RuntimeException
Root exception for DSL parsing related exceptions. Rather than holding a hard coded string indicating the problem, it records a message key and the inserts for the message. See DSLMessage for the list of all possible messages that can occur.
See Also:
  • Field Details

    • expressionString

      protected String expressionString
    • position

      protected int position
    • message

      protected DSLMessage message
    • inserts

      protected Object[] inserts
  • Constructor Details

    • ParseException

      public ParseException(String expressionString, int position, DSLMessage message, Object... inserts)
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
      Returns:
      a formatted message with inserts applied
    • getMessageCode

      public DSLMessage getMessageCode()
      Returns:
      the message code
    • getInserts

      public Object[] getInserts()
      Returns:
      the message inserts
    • getExpressionString

      public final String getExpressionString()
      Returns:
      the dsl expression text
    • getPosition

      public final int getPosition()
      Returns:
      location of the error in the expression text
    • toExceptionDescriptor

      public Map<String,Object> toExceptionDescriptor()
      Produce a simple map of information about the exception that can be sent to the client for display.
      Returns:
      map of simple information including message and position