| java.lang.Object org.openide.util.Exceptions
Exceptions | final public class Exceptions extends Object (Code) | | 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.
since: 7.2 |
attachLocalizedMessage | public static E attachLocalizedMessage(E e, String localizedMessage)(Code) | | Attaches additional localized message to given exception. This message
can be extracted later by using
Exceptions.findLocalizedMessage .
Parameters: e - exception to annotate Parameters: localizedMessage - the localized message to add to the exception the exception e |
attachMessage | public static E attachMessage(E e, String msg)(Code) | | Attaches additional message to given exception. This message will
be visible when one does e.printStackTrace() .
Parameters: e - exception to annotate Parameters: msg - the message to add to the exception the exception e |
findLocalizedMessage | public static String findLocalizedMessage(Throwable t)(Code) | | Extracts previously attached localized message for a given throwable.
Complements
Exceptions.attachLocalizedMessage .
Parameters: t - the exception to search for a message in localized message attached to provided exception or null if no such message has been attached |
printStackTrace | public static void printStackTrace(Throwable t)(Code) | | Notifies an exception with a severe level. Such exception is going
to be printed to log file and possibly also notified to alarm the
user somehow.
Parameters: t - the exception to notify |
|
|