Class ExceptionCollection

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.owasp.dependencycheck.exception.ExceptionCollection
All Implemented Interfaces:
Serializable

@NotThreadSafe public class ExceptionCollection extends Exception
A collection of several exceptions.
Author:
Jeremy Long
See Also:
  • Constructor Details

    • ExceptionCollection

      public ExceptionCollection(List<Throwable> exceptions)
      Instantiates a new exception collection.
      Parameters:
      exceptions - a list of exceptions
    • ExceptionCollection

      public ExceptionCollection(List<Throwable> exceptions, boolean fatal)
      Instantiates a new exception collection.
      Parameters:
      exceptions - a list of exceptions
      fatal - indicates if any of the exceptions that occurred is fatal - meaning that no analysis was performed.
    • ExceptionCollection

      public ExceptionCollection(Throwable exception, boolean fatal)
      Instantiates a new exception collection.
      Parameters:
      exception - a list of exceptions
      fatal - indicates if the exception that occurred is fatal - meaning that no analysis was performed.
    • ExceptionCollection

      public ExceptionCollection(Throwable exception)
      Instantiates a new exception collection.
      Parameters:
      exception - a list of exceptions
    • ExceptionCollection

      public ExceptionCollection()
      Instantiates a new exception collection.
  • Method Details

    • getExceptions

      public List<Throwable> getExceptions()
      Get the value of exceptions.
      Returns:
      the value of exceptions
    • addException

      public void addException(Throwable ex)
      Adds an exception to the collection.
      Parameters:
      ex - the exception to add
    • addException

      public void addException(Throwable ex, boolean fatal)
      Adds an exception to the collection.
      Parameters:
      ex - the exception to add
      fatal - 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

      public void printStackTrace(PrintWriter s)
      Prints the stack trace.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      s - the writer to print to
    • printStackTrace

      public void printStackTrace(PrintStream s)
      Prints the stack trace.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      s - the stream to write the stack trace to
    • getMessage

      public String getMessage()
      Returns the error message, including the message from all contained exceptions.
      Overrides:
      getMessage in class Throwable
      Returns:
      the error message