Package org.jboss.forge.roaster
Class ParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.jboss.forge.roaster.ParserException
-
- All Implemented Interfaces:
Serializable
public class ParserException extends RuntimeException
ParserExceptionis the exception which is thrown if a parsing process fails. The problems occurred during the parsing can be accessed withgetProblems().- Author:
- Lincoln Baxter, III
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParserException()Constructs a newParserExceptionwith no problems, anullerror message and anullcause.ParserException(String message)Constructs a newParserExceptionwith no problems, the given error message and anullcause.ParserException(String message, Throwable cause)Constructs a newParserExceptionwith no problems, the given error message and the given cause.ParserException(String message, List<Problem> problems)Constructs a newParserExceptionwith the given problems, the given error message and anullcause.ParserException(Throwable cause)Constructs a newParserExceptionwith no problems, anullerror message and the given cause.ParserException(List<Problem> problems)Constructs a newParserExceptionwith the given problems, a error message constructed from the problems list and anullcause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
ParserException
public ParserException()
Constructs a newParserExceptionwith no problems, anullerror message and anullcause.
-
ParserException
public ParserException(String message)
Constructs a newParserExceptionwith no problems, the given error message and anullcause.- Parameters:
message- the error message of this exception
-
ParserException
public ParserException(Throwable cause)
Constructs a newParserExceptionwith no problems, anullerror message and the given cause.- Parameters:
cause- the cause of this exception
-
ParserException
public ParserException(String message, Throwable cause)
Constructs a newParserExceptionwith no problems, the given error message and the given cause.- Parameters:
message- the error message of this exceptioncause- the cause of this exception
-
ParserException
public ParserException(String message, List<Problem> problems)
Constructs a newParserExceptionwith the given problems, the given error message and anullcause.Note that the problems list instance is not copied.
- Parameters:
message- the error message of this exceptionproblems- the problems of this exception
-
-
Method Detail
-
getProblems
public List<Problem> getProblems()
Get the problems occurred during a parsing process. The returned list is maybe empty but nevernull.- Returns:
- a unmodifiable list of the problems occurred during a parsing process
- See Also:
Collections.unmodifiableList(List)
-
-