public class MultiException
extends java.lang.Exception
Constructor and Description |
---|
MultiException() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Throwable e) |
java.lang.Throwable |
getThrowable(int i) |
java.util.List<java.lang.Throwable> |
getThrowables() |
void |
ifExceptionThrow()
Throw a multiexception.
|
void |
ifExceptionThrowMulti()
Throw a multiexception.
|
void |
ifExceptionThrowRuntime()
Throw a Runtime exception.
|
void |
ifExceptionThrowSuppressed()
Throw an Exception, potentially with suppress.
|
int |
size() |
java.lang.String |
toString() |
public void add(java.lang.Throwable e)
public int size()
public java.util.List<java.lang.Throwable> getThrowables()
public java.lang.Throwable getThrowable(int i)
public void ifExceptionThrow() throws java.lang.Exception
java.lang.Exception
- the Error or Exception if nested is 1, or the MultiException itself if nested is more than 1.public void ifExceptionThrowRuntime() throws java.lang.Error
java.lang.Error
- If this exception contains exactly 1 Error
java.lang.RuntimeException
- If this exception contains 1 Throwable
but it is not an error,
or it contains more than 1 Throwable
of any type.public void ifExceptionThrowMulti() throws MultiException
MultiException
- the multiexception if there are nested exceptionpublic void ifExceptionThrowSuppressed() throws java.lang.Exception
java.lang.Exception
- the Error or Exception if at least one is added.public java.lang.String toString()
toString
in class java.lang.Throwable
Copyright © 1995–2023 Webtide. All rights reserved.