Class ErrorManager
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.
- Since:
- 1.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCLOSE_FAILURE is used when a close of an output stream fails.static final intFLUSH_FAILURE is used when a flush to an output stream fails.static final intFORMAT_FAILURE is used when formatting fails for any reason.static final intGENERIC_FAILURE is used for failure that don't fit into one of the other categories.static final intOPEN_FAILURE is used when an open of an output stream fails.static final intWRITE_FAILURE is used when a write to an output stream fails. -
Constructor Summary
Constructors -
Method Summary
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
GENERIC_FAILURE
public static final int GENERIC_FAILUREGENERIC_FAILURE is used for failure that don't fit into one of the other categories.- See Also:
-
WRITE_FAILURE
public static final int WRITE_FAILUREWRITE_FAILURE is used when a write to an output stream fails.- See Also:
-
FLUSH_FAILURE
public static final int FLUSH_FAILUREFLUSH_FAILURE is used when a flush to an output stream fails.- See Also:
-
CLOSE_FAILURE
public static final int CLOSE_FAILURECLOSE_FAILURE is used when a close of an output stream fails.- See Also:
-
OPEN_FAILURE
public static final int OPEN_FAILUREOPEN_FAILURE is used when an open of an output stream fails.- See Also:
-
FORMAT_FAILURE
public static final int FORMAT_FAILUREFORMAT_FAILURE is used when formatting fails for any reason.- See Also:
-
-
Constructor Details
-
ErrorManager
public ErrorManager()Create anErrorManager.
-
-
Method Details
-
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- a descriptive string (may be null)ex- an exception (may be null)code- an error code defined in ErrorManager
-