Class IgnorableException

  • All Implemented Interfaces:
    java.io.Serializable

    public class IgnorableException
    extends java.lang.Exception
    This Exception class can be used when a minor Exception has occured. In most cases it would be ignored. It accepts a list of Exceptions as sources, and will display them all when printed.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addThrowable​(java.lang.Throwable t)
      Adds a Throwable to the list of contained ones.
      java.lang.String getMessage()
      Answers the extra information message which was provided when the throwable was created.
      java.util.List<java.lang.Throwable> getThrowables()
      Returns the list of managed Exceptions.
      boolean isEmpty()
      Determines if this exception contains any Throwables.
      void printStackTrace()
      Outputs a printable representation of the all causes stored in this Exception.
      void printStackTrace​(java.io.PrintStream err)
      Outputs a printable representation of the all causes stored in this Exception.
      void printStackTrace​(java.io.PrintWriter err)
      Outputs a printable representation of the all causes stored in this Exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IgnorableException

        public IgnorableException()
        Constructor.
      • IgnorableException

        public IgnorableException​(java.lang.Throwable ex)
        Constructor.
        Parameters:
        ex - exception's cause.
      • IgnorableException

        public IgnorableException​(java.util.List<java.lang.Throwable> exs)
        Constructor.
        Parameters:
        exs - list of occurred exceptions.
    • Method Detail

      • printStackTrace

        public void printStackTrace()
        Outputs a printable representation of the all causes stored in this Exception.
        Overrides:
        printStackTrace in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace​(java.io.PrintStream err)
        Outputs a printable representation of the all causes stored in this Exception.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        err - The stream to write the walkback on.
      • printStackTrace

        public void printStackTrace​(java.io.PrintWriter err)
        Outputs a printable representation of the all causes stored in this Exception.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        err - The writer to write the walkback on.
      • addThrowable

        public void addThrowable​(java.lang.Throwable t)
        Adds a Throwable to the list of contained ones.
        Parameters:
        t - a Throwable to add to the managed list.
      • getThrowables

        public java.util.List<java.lang.Throwable> getThrowables()
        Returns the list of managed Exceptions.
        Returns:
        the list of managed Exceptions.
      • isEmpty

        public boolean isEmpty()
        Determines if this exception contains any Throwables.
        Returns:
        wheter the list of managed Throwables is Empty or not.
      • getMessage

        public java.lang.String getMessage()
        Answers the extra information message which was provided when the throwable was created. The messages of the contained Throwables will also be listed. If no message was provided for any of the Throwables, null will be logged for it.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        String The receiver's message.