Class CompositeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.linecorp.armeria.common.util.CompositeException
All Implemented Interfaces:
Serializable

public final class CompositeException
extends RuntimeException
Represents an exception that is a composite of one or more other exceptions. A CompositeException does not modify the structure of any exception it wraps, but at print-time it iterates through the list of Throwables contained in the composite in order to print them all.

Its invariant is to contain an immutable, ordered (by insertion order), unique list of non-composite exceptions. You can retrieve individual exceptions in this list with getExceptions().

The printStackTrace() implementation handles the StackTrace in a customized way instead of using getCause() so that it can avoid circular references.

If you invoke getCause(), it will lazily create the causal chain but will stop if it finds any Throwable in the chain that it has already seen.

See Also:
Serialized Form