Package com.tridion.util
Class ExceptionUtils
java.lang.Object
com.tridion.util.ExceptionUtils
The
ExceptionUtils class provides useful methods for working with Exceptions.-
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowablegetAppropriateTridionCause(Throwable throwable) This method loops all inner most causes and returns first throwable object.static StringgetMessageAndStackTrace(Throwable throwable) Creates a string representation of the exception.static StringgetStackTrace(Throwable throwable) Creates a string representation of the stacktrace of the throwable.
-
Method Details
-
getMessageAndStackTrace
Creates a string representation of the exception. If no message is available, only the string representation of the stacktrace will be returned.- Parameters:
throwable- The Throwable that should be converted to a String.- Returns:
- a String representation of the Throwable.
-
getStackTrace
Creates a string representation of the stacktrace of the throwable.- Parameters:
throwable- The Throwable for which the stacktrace should be converted to a String.- Returns:
- a String representation of the stacktrace of the Throwable.
-
getAppropriateTridionCause
This method loops all inner most causes and returns first throwable object.- Parameters:
throwable- The throwable for which it should get deepest cause.- Returns:
- inner most throwable object
-