ErrorManager
open class ErrorManager
kotlin.Any | |
↳ | java.util.logging.ErrorManager |
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.
Summary
Constants | |
---|---|
static Int |
CLOSE_FAILURE is used when a close of an output stream fails. |
static Int |
FLUSH_FAILURE is used when a flush to an output stream fails. |
static Int |
FORMAT_FAILURE is used when formatting fails for any reason. |
static Int |
GENERIC_FAILURE is used for failure that don't fit into one of the other categories. |
static Int |
OPEN_FAILURE is used when an open of an output stream fails. |
static Int |
WRITE_FAILURE is used when a write to an output stream fails. |
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
The error method is called when a Handler failure occurs. |
Constants
CLOSE_FAILURE
static val CLOSE_FAILURE: Int
CLOSE_FAILURE is used when a close of an output stream fails.
Value: 3
FLUSH_FAILURE
static val FLUSH_FAILURE: Int
FLUSH_FAILURE is used when a flush to an output stream fails.
Value: 2
FORMAT_FAILURE
static val FORMAT_FAILURE: Int
FORMAT_FAILURE is used when formatting fails for any reason.
Value: 5
GENERIC_FAILURE
static val GENERIC_FAILURE: Int
GENERIC_FAILURE is used for failure that don't fit into one of the other categories.
Value: 0
OPEN_FAILURE
static val OPEN_FAILURE: Int
OPEN_FAILURE is used when an open of an output stream fails.
Value: 4
WRITE_FAILURE
static val WRITE_FAILURE: Int
WRITE_FAILURE is used when a write to an output stream fails.
Value: 1
Public constructors
Public methods
error
open fun error(
msg: String!,
ex: Exception!,
code: Int
): Unit
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 |
String!: a descriptive string (may be null) |
ex |
Exception!: an exception (may be null) |
code |
Int: an error code defined in ErrorManager |