Class ErrorManager
public class ErrorManager extends Object
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
Modifier and Type | Field | Description |
---|---|---|
static final int |
CLOSE_FAILURE |
CLOSE_FAILURE is used when a close of an output stream fails. |
static final int |
FLUSH_FAILURE |
FLUSH_FAILURE is used when a flush to an output stream fails. |
static final int |
FORMAT_FAILURE |
FORMAT_FAILURE is used when formatting fails for any reason. |
static final int |
GENERIC_FAILURE |
GENERIC_FAILURE is used for failure that don't fit into one of the other categories. |
static final int |
OPEN_FAILURE |
OPEN_FAILURE is used when an open of an output stream fails. |
static final int |
WRITE_FAILURE |
WRITE_FAILURE is used when a write to an output stream fails. |
Constructor Summary
Constructor | Description |
---|---|
ErrorManager() |
Create an ErrorManager . |
Method Summary
Field Details
GENERIC_FAILURE
public static final int GENERIC_FAILURE
- See Also:
WRITE_FAILURE
public static final int WRITE_FAILURE
- See Also:
FLUSH_FAILURE
public static final int FLUSH_FAILURE
- See Also:
CLOSE_FAILURE
public static final int CLOSE_FAILURE
- See Also:
OPEN_FAILURE
public static final int OPEN_FAILURE
- See Also:
FORMAT_FAILURE
public static final int FORMAT_FAILURE
- See Also:
Constructor Details
ErrorManager
public ErrorManager()
ErrorManager
.Method Details
error
public void error(String msg, Exception ex, int code)
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
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.logging/java/util/logging/ErrorManager.html