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.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CLOSE_FAILURE
CLOSE_FAILURE is used when a close of an output stream fails. |
| public static final int | FLUSH_FAILURE
FLUSH_FAILURE is used when a flush to an output stream fails. |
| public static final int | FORMAT_FAILURE
FORMAT_FAILURE is used when formatting fails for any reason. |
| public static final int | GENERIC_FAILURE
GENERIC_FAILURE is used for failure that don't fit into one of the other categories. |
| public static final int | OPEN_FAILURE
OPEN_FAILURE is used when an open of an output stream fails. |
| private boolean | |
| public static final int | WRITE_FAILURE
WRITE_FAILURE is used when a write to an output stream fails. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| CLOSE_FAILURE | back to summary |
|---|---|
| public static final int CLOSE_FAILURE CLOSE_FAILURE is used when a close of an output stream fails. | |
| FLUSH_FAILURE | back to summary |
|---|---|
| public static final int FLUSH_FAILURE FLUSH_FAILURE is used when a flush to an output stream fails. | |
| FORMAT_FAILURE | back to summary |
|---|---|
| public static final int FORMAT_FAILURE FORMAT_FAILURE is used when formatting fails for any reason. | |
| GENERIC_FAILURE | back to summary |
|---|---|
| public static final int GENERIC_FAILURE GENERIC_FAILURE is used for failure that don't fit into one of the other categories. | |
| OPEN_FAILURE | back to summary |
|---|---|
| public static final int OPEN_FAILURE OPEN_FAILURE is used when an open of an output stream fails. | |
| reported | back to summary |
|---|---|
| private boolean reported | |
| WRITE_FAILURE | back to summary |
|---|---|
| public static final int WRITE_FAILURE WRITE_FAILURE is used when a write to an output stream fails. | |
| ErrorManager | back to summary |
|---|---|
| public ErrorManager() Create an | |
| error | back to summary |
|---|---|
| public 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. | |