The ErrorManager is used to handle any errors that occur.
The error manager defines a single method:
void error(String msg, Exception ex, int code)
The codes are defined as static integers in the ErrorManager class and are listed in the following table.
Error Code | Description |
CLOSE_FAILURE | Used when close() fails |
FLUSH_FAILURE | Used when flush() fails |
FORMAT_FAILURE | Used when formatting fails for any reason |
GENERIC_FAILURE | Used for any other error that other error codes don't match |
OPEN_FAILURE | Used when open of an output source fails |
WRITE_FAILURE | Used when writing to the output source fails |