|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.ExceptionUtil
public final class ExceptionUtil
A class that implements common used classes for exception handling.
| Method Summary | |
|---|---|
static String |
formatExceptionMessage(String message,
Throwable cause)
Formats an exception message and/or an exception cause to a message. |
static Throwable |
getRootCause(Throwable ex)
Recursively get the root cause of an exception. |
static void |
printStackTrace(Throwable t,
PrintWriter writer)
Prints the stack trace of the given Throwable. |
static void |
printStackTrace(Throwable t,
PrintWriter writer,
boolean filter)
Prints the stack trace of the given Throwable. |
static void |
rethrowUnchecked(Throwable e)
Rethrows an unchecked exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Throwable getRootCause(Throwable ex)
ex - an exception
public static void rethrowUnchecked(Throwable e)
RuntimeException
or Error.
e - an unchecked exception
IllegalArgumentException - if throwable contained a checked exception.
public static void printStackTrace(Throwable t,
PrintWriter writer)
Throwable.printStackTrace().
t - the throwablewriter - a PrintWriter
public static void printStackTrace(Throwable t,
PrintWriter writer,
boolean filter)
Throwable.printStackTrace().
t - the throwablewriter - a PrintWriterfilter - if true, the stack trace will be filtered from the bottom up
to suppress standard Java and RoboticsAPI stack elements until
the first unknown element.
public static String formatExceptionMessage(String message,
Throwable cause)
message - exception messagecause - exception cause
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||