java.util.logging
Class ErrorManager

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.logging.ErrorManager

public class ErrorManager
extends Object sample code for java.lang.Object definition code for java.lang.Object

ErrorManager objects can be attached to Handlers to process any error that occur 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.


Field Summary
static int CLOSE_FAILURE sample code for java.util.logging.ErrorManager.CLOSE_FAILURE definition code for java.util.logging.ErrorManager.CLOSE_FAILURE
          CLOSE_FAILURE is used when a close of an output stream fails.
static int FLUSH_FAILURE sample code for java.util.logging.ErrorManager.FLUSH_FAILURE definition code for java.util.logging.ErrorManager.FLUSH_FAILURE
          FLUSH_FAILURE is used when a flush to an output stream fails.
static int FORMAT_FAILURE sample code for java.util.logging.ErrorManager.FORMAT_FAILURE definition code for java.util.logging.ErrorManager.FORMAT_FAILURE
          FORMAT_FAILURE is used when formatting fails for any reason.
static int GENERIC_FAILURE sample code for java.util.logging.ErrorManager.GENERIC_FAILURE definition code for java.util.logging.ErrorManager.GENERIC_FAILURE
          GENERIC_FAILURE is used for failure that don't fit into one of the other categories.
static int OPEN_FAILURE sample code for java.util.logging.ErrorManager.OPEN_FAILURE definition code for java.util.logging.ErrorManager.OPEN_FAILURE
          OPEN_FAILURE is used when an open of an output stream fails.
static int WRITE_FAILURE sample code for java.util.logging.ErrorManager.WRITE_FAILURE definition code for java.util.logging.ErrorManager.WRITE_FAILURE
          WRITE_FAILURE is used when a write to an output stream fails.
 
Constructor Summary
ErrorManager sample code for java.util.logging.ErrorManager.ErrorManager() definition code for java.util.logging.ErrorManager.ErrorManager() ()
           
 
Method Summary
 void error sample code for java.util.logging.ErrorManager.error(java.lang.String, java.lang.Exception, int) definition code for java.util.logging.ErrorManager.error(java.lang.String, java.lang.Exception, int) (String sample code for java.lang.String definition code for java.lang.String  msg, Exception sample code for java.lang.Exception definition code for java.lang.Exception  ex, int code)
          The error method is called when a Handler failure occurs.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

GENERIC_FAILURE sample code for java.util.logging.ErrorManager.GENERIC_FAILURE

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

See Also:
Constant Field Values

WRITE_FAILURE sample code for java.util.logging.ErrorManager.WRITE_FAILURE

public static final int WRITE_FAILURE
WRITE_FAILURE is used when a write to an output stream fails.

See Also:
Constant Field Values

FLUSH_FAILURE sample code for java.util.logging.ErrorManager.FLUSH_FAILURE

public static final int FLUSH_FAILURE
FLUSH_FAILURE is used when a flush to an output stream fails.

See Also:
Constant Field Values

CLOSE_FAILURE sample code for java.util.logging.ErrorManager.CLOSE_FAILURE

public static final int CLOSE_FAILURE
CLOSE_FAILURE is used when a close of an output stream fails.

See Also:
Constant Field Values

OPEN_FAILURE sample code for java.util.logging.ErrorManager.OPEN_FAILURE

public static final int OPEN_FAILURE
OPEN_FAILURE is used when an open of an output stream fails.

See Also:
Constant Field Values

FORMAT_FAILURE sample code for java.util.logging.ErrorManager.FORMAT_FAILURE

public static final int FORMAT_FAILURE
FORMAT_FAILURE is used when formatting fails for any reason.

See Also:
Constant Field Values
Constructor Detail

ErrorManager sample code for java.util.logging.ErrorManager() definition code for java.util.logging.ErrorManager()

public ErrorManager()
Method Detail

error sample code for java.util.logging.ErrorManager.error(java.lang.String, java.lang.Exception, int) definition code for java.util.logging.ErrorManager.error(java.lang.String, java.lang.Exception, int)

public void error(String sample code for java.lang.String definition code for java.lang.String  msg,
                  Exception sample code for java.lang.Exception definition code for java.lang.Exception  ex,
                  int code)
The error method is called when a Handler failure occurs.

This method may be overriden 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 - a descriptive string (may be null)
ex - an exception (may be null)
code - an error code defined in ErrorManager