Package de.jplag
Class ParsingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.jplag.ParsingException
- All Implemented Interfaces:
Serializable
An exception to throw if any error occurred while parsing files in a language frontend.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParsingException(File file) Constructs a new exception indicating a parsing exception in the given file without a specific reason.ParsingException(File file, String reason) Constructs a new exception indicating a parsing exception in the given file with the given reason.ParsingException(File file, String reason, Throwable cause) Constructs a new exception indicating a parsing exception in the given file with the given reason and cause.ParsingException(File file, Throwable cause) Constructs a new exception indicating a parsing exception in the given file with the given cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParsingExceptionwrappingExceptions(Collection<ParsingException> exceptions) Creates a new parsing exception which wraps the provided exceptions.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParsingException
Constructs a new exception indicating a parsing exception in the given file without a specific reason.- Parameters:
file- the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)
-
ParsingException
Constructs a new exception indicating a parsing exception in the given file with the given reason.- Parameters:
file- the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)reason- the reason the parsing failed. A null value is permitted.)
-
ParsingException
Constructs a new exception indicating a parsing exception in the given file with the given cause.- Parameters:
file- the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)cause- the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
ParsingException
Constructs a new exception indicating a parsing exception in the given file with the given reason and cause.- Parameters:
file- the file in which a parsing error occurred. (A null value is permitted, and indicates that the file is nonexistent or unknown.)reason- the reason the parsing failed. A null value is permitted.)cause- the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
-
Method Details
-
wrappingExceptions
Creates a new parsing exception which wraps the provided exceptions. If no exception to wrap is provided, null is returned. If only one exception is provided, it is returned.- Parameters:
exceptions- the collection of exceptions to wrap.- Returns:
- a new parsing exception wrapping the provided exceptions,
nullif no exceptions are provided, or the provided exception if only one was provided.
-