Class ParseError

  • All Implemented Interfaces:
    java.io.Serializable

    public class ParseError
    extends java.lang.RuntimeException
    Represents a syntax error that is found while a string is being parsed.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      ParserContext context
      The parsing context that was in effect at the time the error occurred.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseError​(java.lang.String message, ParserContext context)
      Create a new ParseError with a given error message and parsing context.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • context

        public ParserContext context
        The parsing context that was in effect at the time the error occurred. This includes the string that was being processed and the position in the string where the error occured. These values are context.data and context.pos.
    • Constructor Detail

      • ParseError

        public ParseError​(java.lang.String message,
                          ParserContext context)
        Create a new ParseError with a given error message and parsing context.