Class CompoundException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CompoundException
    extends java.lang.Exception
    An exception detailing multiple reasons for failure.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.Throwable> causeList  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      CompoundException​(java.util.Collection<java.lang.Throwable> why)
      Constructs an exception detailing many potential reasons for failure.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String format​(java.util.Collection<java.lang.Throwable> causes)  
      java.util.List<java.lang.Throwable> getAllCauses()
      Get the complete list of reasons why this failure happened.
      • 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
    • Field Detail

      • causeList

        private final java.util.List<java.lang.Throwable> causeList
    • Constructor Detail

      • CompoundException

        public CompoundException​(java.util.Collection<java.lang.Throwable> why)
        Constructs an exception detailing many potential reasons for failure.
        Parameters:
        why - Two or more exceptions that may have been the problem.
    • Method Detail

      • format

        private static java.lang.String format​(java.util.Collection<java.lang.Throwable> causes)
      • getAllCauses

        public java.util.List<java.lang.Throwable> getAllCauses()
        Get the complete list of reasons why this failure happened.
        Returns:
        unmodifiable collection of all possible reasons.