public final class Exceptions
extends java.lang.Object
Throwable
.Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getStacktrace(java.lang.Throwable t)
Returns throwable's stacktrace as a string.
|
static boolean |
isChecked(java.lang.Class<? extends java.lang.Throwable> t)
Checks if given exception is checked.
|
static boolean |
isChecked(java.lang.Throwable t)
Checks if given exception is checked.
|
static void |
throwIfUnchecked(java.lang.Throwable t)
Throws given throwable if it is unchecked.
|
public static java.lang.String getStacktrace(java.lang.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 nulljava.lang.NullPointerException
- if t is nullpublic static boolean isChecked(java.lang.Throwable t)
t
- the throwable to check, not nulltrue
if given throwable is neither Error
nor
RuntimeException
.java.lang.IllegalArgumentException
- if t is nullpublic static boolean isChecked(java.lang.Class<? extends java.lang.Throwable> t)
t
- the throwable to check, not nulltrue
if given throwable is neither Error
nor
RuntimeException
.java.lang.IllegalArgumentException
- if t is nullpublic static void throwIfUnchecked(java.lang.Throwable t)
t
- the throwable to throwCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.