Class ErrorManager

A more or less deprecated system of managing, annotating, and classifying errors
and log messages. Instead of ErrorManager use
Logger as described in NetBeans logging guide.

Rather then using the ErrorManager consider using JDK's Logger
for reporting log events, unwanted exceptions, etc. The methods
in this class which are deprecated are annotated with a description
how to use use the Logger methods to achieve the same goal.

You can also specify the severity when you are creating the
exception (by annotating it), rather than relying on the notifier
to do this. In that case, if the notifier just use the plain form
of notify (i.e. UNKNOWN severity), the
annotated severity is used.

notify

Prints the exception to the log file and (possibly) notifies the user.
Use of ErrorManager.UNKNOWN severity means that the error manager should automatically
select an appropriate severity level, for example based on the contents of
annotations in the throwable.

isNotifiable

Test whether a throwable, if notified at the given
level, will actually be displayed in any way (even to a log file etc.).
If not, there is no point in constructing it.

This method is distinct from ErrorManager.isLoggable(int) because an error manager
implementation may choose to notify stack traces at a level where it would
not log messages. See issue #24056 for justification.

The default implementation just calls ErrorManager.isLoggable(int). Subclasses
should override to be more precise - treat this method as abstract.

Parameters:

severity - a notification severity

Returns:

true if a throwable notified at this severity will be used; false if it will be ignored

getInstance

By convention, you can name error managers the same as packages (or classes)
they are designed to report information from.
For example, org.netbeans.modules.mymodule.ComplicatedParser.

The error manager implementation should provide some way of configuring e.g.
the logging level for error managers of different names. For example, in the basic
NetBeans core implementation, you can define a system property with the same name
as the future error manager (or a package prefix of it) whose value is the numeric
logging level (e.g. -J-Dorg.netbeans.modules.mymodule.ComplicatedParser=0
to log everything). Other implementations may have quite different ways of configuring
the error managers.