Package org.eclipse.aether
Class MultiRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.eclipse.aether.MultiRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
public final class MultiRuntimeException extends java.lang.RuntimeException
Runtime exception to be thrown when multiple actions were executed and one or more failed. To be used when no fallback on resolver side is needed or is possible.- Since:
- 1.9.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<? extends java.lang.Throwable>
getThrowables()
Returns the list of throwables that are wrapped in this exception.static void
mayThrow(java.lang.String message, java.util.List<? extends java.lang.Throwable> throwables)
Helper method that receives a (non-null) message and (non-null) list of throwable, and following happens: if list is empty - nothing if list not empty -MultiRuntimeException
is thrown wrapping all elements
-
-
-
Method Detail
-
getThrowables
public java.util.List<? extends java.lang.Throwable> getThrowables()
Returns the list of throwables that are wrapped in this exception.- Returns:
- The list of throwables, never
null
.
-
mayThrow
public static void mayThrow(java.lang.String message, java.util.List<? extends java.lang.Throwable> throwables)
Helper method that receives a (non-null) message and (non-null) list of throwable, and following happens:- if list is empty - nothing
- if list not empty -
MultiRuntimeException
is thrown wrapping all elements
-
-