Package com.ibm.di.exceptions
Class IgnorableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.ibm.di.exceptions.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
-
-
Constructor Summary
Constructors Constructor Description IgnorableException()
Constructor.IgnorableException(java.lang.Throwable ex)
Constructor.IgnorableException(java.util.List<java.lang.Throwable> exs)
Constructor.
-
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.
-
-
-
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 classjava.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 classjava.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 classjava.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 classjava.lang.Throwable
- Returns:
- String The receiver's message.
-
-