Package scriptella.util
Class ExceptionUtils
java.lang.Object
scriptella.util.ExceptionUtils
Utility class to work with throwables.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowableThis method checks if throwable hascause.static voidignoreThrowable(Throwable throwable) Utility method to ignore non important exceptions.static voidthrowUnchecked(Throwable unchecked) This method throws unchecked throwable, i.e.
-
Method Details
-
getCause
This method checks if throwable hascause. 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
This method throws unchecked throwable, i.e.ErrororRuntimeException.- Parameters:
unchecked- unchecked throwable.
-
ignoreThrowable
Utility method to ignore non important exceptions.- Parameters:
throwable- throwable to ignore.
-