java.util.logging
Class ErrorManager

java.lang.Object
  extended by java.util.logging.ErrorManager

public class ErrorManager
extends Object

An ErrorManager deals with errors that a Handler encounters while logging.

See Also:
Handler.setErrorManager(ErrorManager)

Field Summary
static int CLOSE_FAILURE
          Indicates that there was a problem upon closing an output stream.
static int FLUSH_FAILURE
          Indicates that there was a problem upon flushing an output stream.
static int FORMAT_FAILURE
          Indicates that there was a problem upon formatting the message of a log record.
static int GENERIC_FAILURE
          Indicates that there was a failure that does not readily fall into any of the other categories.
static int OPEN_FAILURE
          Indicates that there was a problem upon opening an output stream.
static int WRITE_FAILURE
          Indicates that there was a problem upon writing to an output stream.
 
Constructor Summary
ErrorManager()
           
 
Method Summary
 void error(String message, Exception ex, int errorCode)
          Reports an error that occured upon logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERIC_FAILURE

public static final int GENERIC_FAILURE
Indicates that there was a failure that does not readily fall into any of the other categories.

See Also:
Constant Field Values

WRITE_FAILURE

public static final int WRITE_FAILURE
Indicates that there was a problem upon writing to an output stream.

See Also:
Constant Field Values

FLUSH_FAILURE

public static final int FLUSH_FAILURE
Indicates that there was a problem upon flushing an output stream.

See Also:
Constant Field Values

CLOSE_FAILURE

public static final int CLOSE_FAILURE
Indicates that there was a problem upon closing an output stream.

See Also:
Constant Field Values

OPEN_FAILURE

public static final int OPEN_FAILURE
Indicates that there was a problem upon opening an output stream.

See Also:
Constant Field Values

FORMAT_FAILURE

public static final int FORMAT_FAILURE
Indicates that there was a problem upon formatting the message of a log record.

See Also:
Constant Field Values
Constructor Detail

ErrorManager

public ErrorManager()
Method Detail

error

public void error(String message,
                  Exception ex,
                  int errorCode)
Reports an error that occured upon logging. The default implementation emits the very first error to System.err, ignoring subsequent errors.

Parameters:
message - a message describing the error, or null if there is no suitable description.
ex - an exception, or null if the error is not related to an exception.
errorCode - one of the defined error codes, for example ErrorManager.CLOSE_FAILURE.