Top Description Fields Constructors Methods
org.jboss.logmanager

public abstract Class ExtErrorManager

extends ErrorManager
Class Inheritance
Known Direct Subclasses
org.jboss.logmanager.errormanager.HandlerErrorManager, org.jboss.logmanager.errormanager.OnlyOnceErrorManager, org.jboss.logmanager.errormanager.SimpleErrorManager
Imports
java.util.logging.ErrorManager

An extended error manager, which contains additional useful utilities for error managers.

Field Summary

Inherited from java.util.logging.ErrorManager:
CLOSE_FAILUREFLUSH_FAILUREFORMAT_FAILUREGENERIC_FAILUREOPEN_FAILUREWRITE_FAILURE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
error(final String
a descriptive string (may be null)
msg
,
final Exception
an exception (may be null)
ex
,
final int
an error code defined in ErrorManager
code
)

Overrides java.util.logging.ErrorManager.error.

The error method is called when a Handler failure occurs.

protected ExtLogRecord

Returns:

the log record (not null)
errorToLogRecord
(String
the error message (possibly null)
msg
,
Exception
the error exception (possibly null)
ex
,
int
the error code
code
)

Convert the given error to a log record which can be published to handler(s) or stored.

protected String

Returns:

the corresponding name (not null)
nameForCode
(int
the error code
code
)

Get the name corresponding to the given error code.

Constructor Detail

ExtErrorManagerback to summary
public ExtErrorManager()

Method Detail

errorback to summary
public void error(final String msg, final Exception ex, final int code)

Overrides java.util.logging.ErrorManager.error.

Doc from java.util.logging.ErrorManager.error.

The error method is called when a Handler failure occurs.

This method may be overridden in subclasses. The default behavior in this base class is that the first call is reported to System.err, and subsequent calls are ignored.

Parameters
msg:String

a descriptive string (may be null)

ex:Exception

an exception (may be null)

code:int

an error code defined in ErrorManager

errorToLogRecordback to summary
protected ExtLogRecord errorToLogRecord(String msg, Exception ex, int code)

Convert the given error to a log record which can be published to handler(s) or stored. Care should be taken not to publish the log record to a logger that writes to the same handler that produced the error.

Parameters
msg:String

the error message (possibly null)

ex:Exception

the error exception (possibly null)

code:int

the error code

Returns:ExtLogRecord

the log record (not null)

nameForCodeback to summary
protected String nameForCode(int code)

Get the name corresponding to the given error code.

Parameters
code:int

the error code

Returns:String

the corresponding name (not null)