|
Oracle® On Track Communication SDK Documentation Release 1(1.0) E20955-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
waggle.core.exceptions.XExceptionUtils
public final class XExceptionUtils
Exception utilities.
| Method Summary | |
|---|---|
static Throwable |
getCause(Object[] arguments)Check if the last argument is an exception of not. |
static String |
getExceptionMessagesAsString(Throwable ex, String separator)Return a String made up of an exception's message, followed by the messages of the exception's cause, and its cause, etc. |
static XExceptionInfo |
getInfo(Throwable ex, boolean includeStackTrace)Generate an XExceptionInfo object from the specified throwable. |
static Throwable |
getRetryable(Throwable ex)Get the root cause of a retryable exception. |
static String |
getStackTraceAsString(Throwable ex)Return an Exceptions stack trace as a String. |
static boolean |
isCause(Throwable ex, Class<? extends Throwable> cause)Is the cause a reason for the exception. |
static boolean |
isRetryable(Throwable ex)Check if the root cause is a retryable exception. |
static void |
printStackTrace(Throwable ex)Print the specified exception to System.err using our exception format. |
static void |
printStackTrace(Throwable ex, PrintStream s)Print an exception to a PrintStream. |
static void |
printStackTrace(Throwable ex, PrintWriter w)This code originates from JDK classes. |
static void |
printStackTraceAsCause(Throwable ex, PrintWriter w, StackTraceElement[] causedTrace)This code originates from JDK classes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isRetryable(Throwable ex)
ex - The reported Exception.public static Throwable getRetryable(Throwable ex)
ex - The reported Exception.
public static boolean isCause(Throwable ex,
Class<? extends Throwable> cause)
ex - The exception.cause - The cause we are looking for.public static void printStackTrace(Throwable ex)
ex - The exception to print.public static Throwable getCause(Object[] arguments)
arguments - The array of arguments.
public static XExceptionInfo getInfo(Throwable ex,
boolean includeStackTrace)
ex - the throwableincludeStackTrace - True to include the StackTrace. In many environments, the stack trace is considered security-sensitive data, and should not be returned to a client or displayed to a user.public static String getStackTraceAsString(Throwable ex)
ex - The exception.
public static String getExceptionMessagesAsString(Throwable ex,
String separator)
ex - The original exception.separator - A string that will separate the messages.
public static void printStackTrace(Throwable ex,
PrintWriter w)
ex - The Exception to print.w - The Writer to write to.
public static void printStackTrace(Throwable ex,
PrintStream s)
ex - The Exception to print.s - The PrintStream to write to.
public static void printStackTraceAsCause(Throwable ex,
PrintWriter w,
StackTraceElement[] causedTrace)
ex - The Exception to print.w - The Writer to write to.causedTrace - The caused stack.
|
Oracle® On Track Communication SDK Documentation Release 1(1.0) E20955-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||