Class ExceptionCollection
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.owasp.dependencycheck.exception.ExceptionCollection
- All Implemented Interfaces:
Serializable
A collection of several exceptions.
- Author:
- Jeremy Long
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new exception collection.ExceptionCollection(Throwable exception) Instantiates a new exception collection.ExceptionCollection(Throwable exception, boolean fatal) Instantiates a new exception collection.ExceptionCollection(List<Throwable> exceptions) Instantiates a new exception collection.ExceptionCollection(List<Throwable> exceptions, boolean fatal) Instantiates a new exception collection. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an exception to the collection.voidaddException(Throwable ex, boolean fatal) Adds an exception to the collection.Get the value of exceptions.Returns the error message, including the message from all contained exceptions.booleanisFatal()Get the value of fatal.voidPrints the stack trace.voidPrints the stack trace.voidsetFatal(boolean fatal) Set the value of fatal.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExceptionCollection
-
ExceptionCollection
-
ExceptionCollection
Instantiates a new exception collection.- Parameters:
exception- a list of exceptionsfatal- indicates if the exception that occurred is fatal - meaning that no analysis was performed.
-
ExceptionCollection
Instantiates a new exception collection.- Parameters:
exception- a list of exceptions
-
ExceptionCollection
public ExceptionCollection()Instantiates a new exception collection.
-
-
Method Details
-
getExceptions
-
addException
Adds an exception to the collection.- Parameters:
ex- the exception to add
-
addException
Adds an exception to the collection.- Parameters:
ex- the exception to addfatal- flag indicating if this is a fatal error
-
isFatal
public boolean isFatal()Get the value of fatal.- Returns:
- the value of fatal
-
setFatal
public void setFatal(boolean fatal) Set the value of fatal.- Parameters:
fatal- new value of fatal
-
printStackTrace
Prints the stack trace.- Overrides:
printStackTracein classThrowable- Parameters:
s- the writer to print to
-
printStackTrace
Prints the stack trace.- Overrides:
printStackTracein classThrowable- Parameters:
s- the stream to write the stack trace to
-
getMessage
Returns the error message, including the message from all contained exceptions.- Overrides:
getMessagein classThrowable- Returns:
- the error message
-