APIdia Launch Partner
Top Description Fields Constructors Methods
java.util.logging

public Class ErrorManager

extends Object
Class Inheritance
Known Direct Subclasses
java.util.logging.FileHandler.InitializationErrorManager

ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging.

When processing logging output, if a Handler encounters problems then rather than throwing an Exception back to the issuer of the logging call (who is unlikely to be interested) the Handler should call its associated ErrorManager.

Since
1.4

Field Summary

Modifier and TypeField and Description
public static final int
CLOSE_FAILURE

CLOSE_FAILURE is used when a close of an output stream fails.

public static final int
FLUSH_FAILURE

FLUSH_FAILURE is used when a flush to an output stream fails.

public static final int
FORMAT_FAILURE

FORMAT_FAILURE is used when formatting fails for any reason.

public static final int
GENERIC_FAILURE

GENERIC_FAILURE is used for failure that don't fit into one of the other categories.

public static final int
OPEN_FAILURE

OPEN_FAILURE is used when an open of an output stream fails.

private boolean
public static final int
WRITE_FAILURE

WRITE_FAILURE is used when a write to an output stream fails.

Constructor Summary

AccessConstructor and Description
public
ErrorManager()

Create an ErrorManager.

Method Summary

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

The error method is called when a Handler failure occurs.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLOSE_FAILUREback to summary
public static final int CLOSE_FAILURE

CLOSE_FAILURE is used when a close of an output stream fails.

FLUSH_FAILUREback to summary
public static final int FLUSH_FAILURE

FLUSH_FAILURE is used when a flush to an output stream fails.

FORMAT_FAILUREback to summary
public static final int FORMAT_FAILURE

FORMAT_FAILURE is used when formatting fails for any reason.

GENERIC_FAILUREback to summary
public static final int GENERIC_FAILURE

GENERIC_FAILURE is used for failure that don't fit into one of the other categories.

OPEN_FAILUREback to summary
public static final int OPEN_FAILURE

OPEN_FAILURE is used when an open of an output stream fails.

reportedback to summary
private boolean reported
WRITE_FAILUREback to summary
public static final int WRITE_FAILURE

WRITE_FAILURE is used when a write to an output stream fails.

Constructor Detail

ErrorManagerback to summary
public ErrorManager()

Create an ErrorManager.

Method Detail

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

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