|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.exceptions.Exceptions
public class Exceptions
Method Summary | |
---|---|
static java.lang.Throwable
|
collapse(java.lang.Throwable source)
as propagateCollapsed(Throwable) but does not throw |
static java.lang.String
|
collapseText(java.lang.Throwable t)
like collapse(Throwable) but returning a one-line message suitable for logging without traces |
static java.lang.Throwable
|
getFirstInteresting(java.lang.Throwable throwable)
returns the first exception in the call chain which is not of common uninteresting types (ie excluding ExecutionException and PropagatedRuntimeExceptions); or the original throwable if all are uninteresting |
static java.lang.Object
|
getFirstThrowableOfType(java.lang.Throwable from, java.lang.Class clazz)
returns the first exception of the given type, or null |
static java.lang.RuntimeException
|
propagate(java.lang.Throwable throwable)
Propagate a java.lang.Throwable as a java.lang.RuntimeException. |
static java.lang.RuntimeException
|
propagateCollapsed(java.lang.Throwable source)
removes uninteresting items from the top of the call stack (but keeps interesting messages), and throws |
static void
|
propagateIfFatal(java.lang.Throwable throwable)
Propagate exceptions which are fatal. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public static java.lang.Throwable collapse(java.lang.Throwable source)
public static java.lang.String collapseText(java.lang.Throwable t)
public static java.lang.Throwable getFirstInteresting(java.lang.Throwable throwable)
@SuppressWarnings("unchecked") public static java.lang.Object getFirstThrowableOfType(java.lang.Throwable from, java.lang.Class clazz)
public static java.lang.RuntimeException propagate(java.lang.Throwable throwable)
Like Guava Throwables#propagate(Throwable)#propagate(Throwable) but:
public static java.lang.RuntimeException propagateCollapsed(java.lang.Throwable source)
public static void propagateIfFatal(java.lang.Throwable throwable)
Propagates only those exceptions which one rarely (if ever) wants to capture, such as java.lang.InterruptedException and java.lang.Errors.
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.