Most visited

Recently visited

Added in API level 1

ErrorManager

public class ErrorManager
extends Object

java.lang.Object
   ↳ java.util.logging.ErrorManager


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.

Summary

Constants

int CLOSE_FAILURE

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

int FLUSH_FAILURE

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

int FORMAT_FAILURE

FORMAT_FAILURE is used when formatting fails for any reason.

int GENERIC_FAILURE

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

int OPEN_FAILURE

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

int WRITE_FAILURE

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

Public constructors

ErrorManager()

Public methods

void error(String msg, Exception ex, int code)

The error method is called when a Handler failure occurs.

Inherited methods

From class java.lang.Object

Constants

CLOSE_FAILURE

Added in API level 1
int CLOSE_FAILURE

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

Constant Value: 3 (0x00000003)

FLUSH_FAILURE

Added in API level 1
int FLUSH_FAILURE

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

Constant Value: 2 (0x00000002)

FORMAT_FAILURE

Added in API level 1
int FORMAT_FAILURE

FORMAT_FAILURE is used when formatting fails for any reason.

Constant Value: 5 (0x00000005)

GENERIC_FAILURE

Added in API level 1
int GENERIC_FAILURE

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

Constant Value: 0 (0x00000000)

OPEN_FAILURE

Added in API level 1
int OPEN_FAILURE

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

Constant Value: 4 (0x00000004)

WRITE_FAILURE

Added in API level 1
int WRITE_FAILURE

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

Constant Value: 1 (0x00000001)

Public constructors

ErrorManager

Added in API level 1
ErrorManager ()

Public methods

error

Added in API level 1
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

Hooray!