Added in API level 1

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
error(msg: String!, ex: Exception!, code: Int)

The error method is called when a Handler failure occurs.

Constants

CLOSE_FAILURE

Added in API level 1
static val CLOSE_FAILURE: Int

CLOSE_FAILURE is used when a close of an output stream fails.

Value: 3

FLUSH_FAILURE

Added in API level 1
static val FLUSH_FAILURE: Int

FLUSH_FAILURE is used when a flush to an output stream fails.

Value: 2

FORMAT_FAILURE

Added in API level 1
static val FORMAT_FAILURE: Int

FORMAT_FAILURE is used when formatting fails for any reason.

Value: 5

GENERIC_FAILURE

Added in API level 1
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

Added in API level 1
static val OPEN_FAILURE: Int

OPEN_FAILURE is used when an open of an output stream fails.

Value: 4

WRITE_FAILURE

Added in API level 1
static val WRITE_FAILURE: Int

WRITE_FAILURE is used when a write to an output stream fails.

Value: 1

Public constructors

ErrorManager

Added in API level 1
ErrorManager()

Public methods

error

Added in API level 1
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