Class ParserException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ParserException
    extends java.lang.RuntimeException
    ParserException is the exception which is thrown if a parsing process fails. The problems occurred during the parsing can be accessed with getProblems().
    Author:
    Lincoln Baxter, III
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ParserException()
      Constructs a new ParserException with no problems, a null error message and a null cause.
      ParserException​(java.lang.String message)
      Constructs a new ParserException with no problems, the given error message and a null cause.
      ParserException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new ParserException with no problems, the given error message and the given cause.
      ParserException​(java.lang.String message, java.util.List<Problem> problems)
      Constructs a new ParserException with the given problems, the given error message and a null cause.
      ParserException​(java.lang.Throwable cause)
      Constructs a new ParserException with no problems, a null error message and the given cause.
      ParserException​(java.util.List<Problem> problems)
      Constructs a new ParserException with the given problems, a error message constructed from the problems list and a null cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Problem> getProblems()
      Get the problems occurred during a parsing process.
      • 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
    • Constructor Detail

      • ParserException

        public ParserException()
        Constructs a new ParserException with no problems, a null error message and a null cause.
      • ParserException

        public ParserException​(java.lang.String message)
        Constructs a new ParserException with no problems, the given error message and a null cause.
        Parameters:
        message - the error message of this exception
      • ParserException

        public ParserException​(java.lang.Throwable cause)
        Constructs a new ParserException with no problems, a null error message and the given cause.
        Parameters:
        cause - the cause of this exception
      • ParserException

        public ParserException​(java.lang.String message,
                               java.lang.Throwable cause)
        Constructs a new ParserException with no problems, the given error message and the given cause.
        Parameters:
        message - the error message of this exception
        cause - the cause of this exception
      • ParserException

        public ParserException​(java.lang.String message,
                               java.util.List<Problem> problems)
        Constructs a new ParserException with the given problems, the given error message and a null cause.

        Note that the problems list instance is not copied.

        Parameters:
        message - the error message of this exception
        problems - the problems of this exception
      • ParserException

        public ParserException​(java.util.List<Problem> problems)
        Constructs a new ParserException with the given problems, a error message constructed from the problems list and a null cause.

        Note that the problems list instance is not copied.

        Parameters:
        problems - the problems of this exception
    • Method Detail

      • getProblems

        public java.util.List<Problem> getProblems()
        Get the problems occurred during a parsing process. The returned list is maybe empty but never null.
        Returns:
        a unmodifiable list of the problems occurred during a parsing process
        See Also:
        Collections.unmodifiableList(List)