com.android.jack.api.v01
Class ChainedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.android.jack.api.v01.ChainedException
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<ChainedException>
- Direct Known Subclasses:
- ConfigurationException
public abstract class ChainedException
- extends java.lang.Exception
- implements java.lang.Iterable<ChainedException>
Abstract class to easily chain exceptions together.
The exception can be managed like any other exception. In this case, the first one will be the
only one used.
Special management can use the iterator() or the getNextException() to browse
all chained exceptions and dispatch them.
See ChainedException.ChainedExceptionBuilder to build the chain of exceptions.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ChainedException
public ChainedException(@Nonnull
java.lang.String message)
ChainedException
public ChainedException(@Nonnull
java.lang.String message,
@Nonnull
java.lang.Throwable cause)
ChainedException
public ChainedException(@Nonnull
java.lang.Throwable cause)
getMessage
@Nonnull
public java.lang.String getMessage()
- Overrides:
getMessage in class java.lang.Throwable
getLocalizedMessage
@Nonnull
public java.lang.String getLocalizedMessage()
- Overrides:
getLocalizedMessage in class java.lang.Throwable
setMessage
public void setMessage(@Nonnull
java.lang.String message)
putAsLastExceptionOf
@Nonnull
protected ChainedException putAsLastExceptionOf(@CheckForNull
ChainedException head)
getNextException
@CheckForNull
public ChainedException getNextException()
getNextExceptionCount
@Nonnegative
public int getNextExceptionCount()
iterator
@Nonnull
public java.util.Iterator<ChainedException> iterator()
- Specified by:
iterator in interface java.lang.Iterable<ChainedException>