Class Problem


  • public class Problem
    extends java.lang.Object
    A problem that was encountered during parsing.
    • Field Detail

      • message

        private final java.lang.String message
      • cause

        private final java.lang.Throwable cause
      • PROBLEM_BY_BEGIN_POSITION

        public static java.util.Comparator<Problem> PROBLEM_BY_BEGIN_POSITION
        Sorts problems on position.
    • Constructor Detail

      • Problem

        public Problem​(java.lang.String message,
                       TokenRange location,
                       java.lang.Throwable cause)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getMessage

        public java.lang.String getMessage()
        Returns:
        the message that was passed into the constructor.
      • getVerboseMessage

        public java.lang.String getVerboseMessage()
        Returns:
        the message plus location information.
      • getLocation

        public java.util.Optional<TokenRange> getLocation()
        Returns:
        the location that was passed into the constructor.
      • getCause

        public java.util.Optional<java.lang.Throwable> getCause()
        Returns:
        the cause that was passed into the constructor.