Brooklyn

brooklyn.util.exceptions
[Java] Class Exceptions

java.lang.Object
  brooklyn.util.exceptions.Exceptions

public class Exceptions

Method Summary
static java.lang.Object getFirstThrowableOfType(java.lang.Throwable from, java.lang.Class clazz)

static java.lang.RuntimeException propagate(java.lang.Throwable throwable)

like guava Throwables#propagate(Throwable)#propagate(Throwable), but set interrupted if interrupted exception (why doesn't guava do this?!)

static void propagateIfFatal(java.lang.Throwable throwable)

propagates exceptions which are fatal, ie those which one rarely if ever wants to capture (such as InterruptedException and Errors)

 
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

getFirstThrowableOfType

@SuppressWarnings("unchecked")
public static java.lang.Object getFirstThrowableOfType(java.lang.Throwable from, java.lang.Class clazz)


propagate

public static java.lang.RuntimeException propagate(java.lang.Throwable throwable)
like guava Throwables#propagate(Throwable)#propagate(Throwable), but set interrupted if interrupted exception (why doesn't guava do this?!), and throw RuntimeInterruptedException


propagateIfFatal

public static void propagateIfFatal(java.lang.Throwable throwable)
propagates exceptions which are fatal, ie those which one rarely if ever wants to capture (such as InterruptedException and Errors)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.