Package org.junit.runners.model
Class MultipleFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.junit.runners.model.MultipleFailureException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultipleFailureException
Collects multiple
Throwable
s into one exception.- Since:
- 4.9
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertEmpty
(List<Throwable> errors) Asserts that a list of throwables is empty.void
void
void
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
fErrors
-
-
Constructor Details
-
MultipleFailureException
-
-
Method Details
-
getFailures
-
getMessage
- Overrides:
getMessage
in classThrowable
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
assertEmpty
Asserts that a list of throwables is empty. If it isn't empty, will throwMultipleFailureException
(if there are multiple throwables in the list) or the first element in the list (if there is only one element).- Parameters:
errors
- list to check- Throws:
Exception
- or Error if the list is not empty
-