org.openmrs.util
Class ExceptionUtil

java.lang.Object
  extended by org.openmrs.util.ExceptionUtil

public class ExceptionUtil
extends java.lang.Object

Utility methods for dealing with exceptions

Since:
1.7.4

Constructor Summary
ExceptionUtil()
           
 
Method Summary
static void rethrowAPIAuthenticationException(java.lang.Throwable thrown)
          If any cause in the given exception chain is an APIAuthenticationException, rethrow that
static void rethrowIfCause(java.lang.Throwable thrown, java.lang.Class<? extends java.lang.RuntimeException> causeType)
          If any cause in the exception chain is an instance of causeType, then rethrow that exception
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtil

public ExceptionUtil()
Method Detail

rethrowIfCause

public static void rethrowIfCause(java.lang.Throwable thrown,
                                  java.lang.Class<? extends java.lang.RuntimeException> causeType)
If any cause in the exception chain is an instance of causeType, then rethrow that exception

Parameters:
thrown -
causeType - must be a RuntimeException so that we can throw it
Expected behavior:
allow an intermediate exception to be rethrown

rethrowAPIAuthenticationException

public static void rethrowAPIAuthenticationException(java.lang.Throwable thrown)
If any cause in the given exception chain is an APIAuthenticationException, rethrow that

Parameters:
thrown -

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change