ErrorManager
Stay organized with collections
Save and categorize content based on your preferences.
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.
Constant Summary
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 Constructor Summary
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Constants
public
static
final
int
CLOSE_FAILURE
CLOSE_FAILURE is used when a close of an output stream fails.
Constant Value:
3
public
static
final
int
FLUSH_FAILURE
FLUSH_FAILURE is used when a flush to an output stream fails.
Constant Value:
2
FORMAT_FAILURE is used when formatting fails for any reason.
Constant Value:
5
public
static
final
int
GENERIC_FAILURE
GENERIC_FAILURE is used for failure that don't fit
into one of the other categories.
Constant Value:
0
public
static
final
int
OPEN_FAILURE
OPEN_FAILURE is used when an open of an output stream fails.
Constant Value:
4
public
static
final
int
WRITE_FAILURE
WRITE_FAILURE is used when a write to an output stream fails.
Constant Value:
1
Public Methods
public
synchronized
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 |
a descriptive string (may be null) |
ex |
an exception (may be null) |
code |
an error code defined in ErrorManager
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-04-08 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]