|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.util.exception.ThrowableUtil
public class ThrowableUtil
Utilities for working with throwables and their messages.
| Method Summary | |
|---|---|
static String |
getAllMessages(Throwable t)
Same as getAllMessages(Throwable, boolean) with the "include exception name" parameter set to
true. |
static String |
getAllMessages(Throwable t,
boolean includeExceptionName)
Returns all the messages for the throwable and all of its causes in one long string. |
static String |
getAllMessages(Throwable t,
boolean includeExceptionNames,
int maxSize)
Generates a string with all exception messages similarly to getAllMessages(Throwable, boolean)
but limits the length of the string to the provided limit. |
static String[] |
getAllMessagesArray(Throwable t)
Same as getAllMessagesArray(Throwable, boolean) with the "include exception name" parameter set to
true. |
static String[] |
getAllMessagesArray(Throwable t,
boolean includeExceptionName)
Returns all the messages for the throwable and all of its causes. |
static String |
getAllSqlExceptionMessages(SQLException t)
Same as #getAllSqlExceptionMessages(Throwable, boolean) with the "include exception name" parameter set
to true. |
static String |
getAllSqlExceptionMessages(SQLException t,
boolean includeExceptionName)
Returns all the messages for the SQL Exception and all of its next exceptions in one long string. |
static String[] |
getAllSqlExceptionMessagesArray(SQLException t)
Same as getAllSqlExceptionMessagesArray(SQLException, boolean) with the "include exception name"
parameter set to true. |
static String[] |
getAllSqlExceptionMessagesArray(SQLException t,
boolean includeExceptionName)
Returns all the messages for the SQL Exception and all of its causes. |
static String |
getRootMessage(Throwable t)
|
static String |
getStackAsString(Throwable t)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getAllMessages(Throwable t,
boolean includeExceptionName)
t - the top throwable (may be null)includeExceptionName - if true, the exception name will prefix all messages
public static final String getAllMessages(Throwable t,
boolean includeExceptionNames,
int maxSize)
getAllMessages(Throwable, boolean)
but limits the length of the string to the provided limit.
The messages are left out of the resulting string in the following manner:
t - includeExceptionNames - maxSize - the maximum size of the message. If < 0, the output is not limited.
public static String getAllMessages(Throwable t)
getAllMessages(Throwable, boolean) with the "include exception name" parameter set to
true.
t - the top throwable (may be null)
public static String[] getAllMessagesArray(Throwable t,
boolean includeExceptionName)
t - the top throwable (may be null)includeExceptionName - if true, the exception name will prefix all messages
public static String[] getAllMessagesArray(Throwable t)
getAllMessagesArray(Throwable, boolean) with the "include exception name" parameter set to
true.
t - the top throwable (may be null)
public static String getAllSqlExceptionMessages(SQLException t,
boolean includeExceptionName)
t - the top SQL Exception (may be null)includeExceptionName - if true, the exception name will prefix all messages
public static String getAllSqlExceptionMessages(SQLException t)
#getAllSqlExceptionMessages(Throwable, boolean) with the "include exception name" parameter set
to true.
t - the top sql exception (may be null)
public static String[] getAllSqlExceptionMessagesArray(SQLException t,
boolean includeExceptionName)
t - the top SQL Exception (may be null)includeExceptionName - if true, the exception name will prefix all messages
public static String[] getAllSqlExceptionMessagesArray(SQLException t)
getAllSqlExceptionMessagesArray(SQLException, boolean) with the "include exception name"
parameter set to true.
t - the top sql exception (may be null)
public static String getStackAsString(Throwable t)
public static String getRootMessage(Throwable t)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||