|
org.openide.util 7.9.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.util.Exceptions
public final class Exceptions
Useful utility and methods to work with exceptions as described in detail in the NetBeans logging guide. Allows to annotate exceptions with messages, extract such messages and provides a common utility method to report an exception.
Method Summary | ||
---|---|---|
static
|
attachLocalizedMessage(E e,
String localizedMessage)
Attaches additional localized message to given exception. |
|
static
|
attachMessage(E e,
String msg)
Attaches additional message to given exception. |
|
static String |
findLocalizedMessage(Throwable t)
Extracts previously attached localized message for a given throwable. |
|
static void |
printStackTrace(Throwable t)
Notifies an exception with a severe level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <E extends Throwable> E attachMessage(E e, String msg)
e.printStackTrace()
.
e
- exception to annotatemsg
- the message to add to the exception
e
public static <E extends Throwable> E attachLocalizedMessage(E e, String localizedMessage)
findLocalizedMessage(java.lang.Throwable)
.
e
- exception to annotatelocalizedMessage
- the localized message to add to the exception
e
public static String findLocalizedMessage(Throwable t)
attachLocalizedMessage(E, java.lang.String)
.
t
- the exception to search for a message in
null
if no such message has been attachedpublic static void printStackTrace(Throwable t)
t
- the exception to notify
|
org.openide.util 7.9.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |