Mega Code Archive

 
Categories / Java Tutorial / Log
 

The ErrorManager

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 CodeDescription CLOSE_FAILUREUsed when close() fails FLUSH_FAILUREUsed when flush() fails FORMAT_FAILUREUsed when formatting fails for any reason GENERIC_FAILUREUsed for any other error that other error codes don't match OPEN_FAILUREUsed when open of an output source fails WRITE_FAILUREUsed when writing to the output source fails