scriptella.util
Class ExceptionUtils

java.lang.Object
  extended by scriptella.util.ExceptionUtils

public final class ExceptionUtils
extends java.lang.Object

Utility class to work with throwables.

Version:
1.0
Author:
Fyodor Kupolov

Method Summary
static java.lang.Throwable getCause(java.lang.Throwable throwable)
          This method checks if throwable has cause.
static void ignoreThrowable(java.lang.Throwable throwable)
          Utility method to ignore non important exceptions.
static void throwUnchecked(java.lang.Throwable unchecked)
          This method throws unchecked throwable, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCause

public static java.lang.Throwable getCause(java.lang.Throwable throwable)
This method checks if throwable has cause. If cause==null, this method tries to obtain cause based on throwable type, e.g. SQLException.getNextException()

Parameters:
throwable - throwable to find cause.
Returns:
cause of throwable.

throwUnchecked

public static void throwUnchecked(java.lang.Throwable unchecked)
This method throws unchecked throwable, i.e. Error or RuntimeException.

Parameters:
unchecked - unchecked throwable.

ignoreThrowable

public static void ignoreThrowable(java.lang.Throwable throwable)
Utility method to ignore non important exceptions.

Parameters:
throwable - throwable to ignore.


Copyright © Copyright 2006-2009 The Scriptella Project Team.