org.opensha.commons.util
Class ExceptionUtils

java.lang.Object
  extended by org.opensha.commons.util.ExceptionUtils

public class ExceptionUtils
extends java.lang.Object


Constructor Summary
ExceptionUtils()
           
 
Method Summary
static java.lang.RuntimeException asRuntimeException(java.lang.Throwable t)
          Returns the given exception as a runtime exception.
static void throwAsRuntimeException(java.lang.Throwable t)
          Throws the given exception as a runtime exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtils

public ExceptionUtils()
Method Detail

throwAsRuntimeException

public static void throwAsRuntimeException(java.lang.Throwable t)
Throws the given exception as a runtime exception. If it already is a runtime exception then it will be simply cast and thrown, otherwise a new runtime exception will be created with this as it's cause.

Parameters:
t -

asRuntimeException

public static java.lang.RuntimeException asRuntimeException(java.lang.Throwable t)
Returns the given exception as a runtime exception. If it already is a runtime exception then it will be simply cast and returned, otherwise a new runtime exception will be created with this as it's cause.

Parameters:
t -