Package org.ow2.clif.util
Class ThrowableHelper
- java.lang.Object
-
- org.ow2.clif.util.ThrowableHelper
-
public abstract class ThrowableHelper extends java.lang.ObjectHelper class for handling throwable objects.- Author:
- Bruno Dillenseger
-
-
Constructor Summary
Constructors Constructor Description ThrowableHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetMessages(java.lang.Throwable ex)Recursively gets exception messages and concatenate them.static java.lang.StringgetStackTrace(java.lang.Throwable ex)This method returns a recursive dump of an Throwable object as a simple Stringstatic java.lang.String[]getStackTraceLines(java.lang.Throwable ex)This method returns a recursive dump of an Throwable object as an array of strings
-
-
-
Method Detail
-
getStackTrace
public static java.lang.String getStackTrace(java.lang.Throwable ex)
This method returns a recursive dump of an Throwable object as a simple String- Parameters:
ex- the throwable object (Exception, Error...)- Returns:
- the full stack trace as a single String
-
getStackTraceLines
public static java.lang.String[] getStackTraceLines(java.lang.Throwable ex)
This method returns a recursive dump of an Throwable object as an array of strings- Parameters:
ex- the throwable object (Exception, Error...)- Returns:
- the full stack trace as an array of strings containing the stack trace lines
-
getMessages
public static java.lang.String getMessages(java.lang.Throwable ex)
Recursively gets exception messages and concatenate them.- Parameters:
ex- the exception to get messages from- Returns:
- A string consisting of exception messages separated with newlines.
-
-