Modifier and Type | Method and Description |
---|---|
static String |
getStacktrace(Throwable t)
Returns throwable's stacktrace as a string.
|
static boolean |
isChecked(Class<? extends Throwable> t)
Checks if given exception is checked.
|
static boolean |
isChecked(Throwable t)
Checks if given exception is checked.
|
static void |
throwIfUnchecked(Throwable t)
Throws given throwable if it is unchecked.
|
public static String getStacktrace(Throwable t)
Throwable.printStackTrace()
to display the
exception stacktrace, for example on the client where the exception
object might not be available.t
- the throwable instance, must not be nullNullPointerException
- if t is nullpublic static boolean isChecked(Throwable t)
t
- the throwable to check, not nulltrue
if given throwable is neither Error
nor
RuntimeException
.IllegalArgumentException
- if t is nullpublic static boolean isChecked(Class<? extends Throwable> t)
t
- the throwable to check, not nulltrue
if given throwable is neither Error
nor
RuntimeException
.IllegalArgumentException
- if t is nullpublic static void throwIfUnchecked(Throwable t)
t
- the throwable to throwCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.