Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ErrorManager

public class ErrorManager
extends Object

java.lang.Object
   ↳ java.util.logging.ErrorManager


An error reporting facility for Handler implementations to record any error that may happen during logging. Handlers should report errors to an ErrorManager, instead of throwing exceptions, which would interfere with the log issuer's execution.

Summary

Constants

int CLOSE_FAILURE

The error code indicating a failure when closing an output stream.

int FLUSH_FAILURE

The error code indicating a failure when flushing an output stream.

int FORMAT_FAILURE

The error code indicating a failure when formatting the error messages.

int GENERIC_FAILURE

The error code indicating a failure that does not fit in any of the specific types of failures that follow.

int OPEN_FAILURE

The error code indicating a failure when opening an output stream.

int WRITE_FAILURE

The error code indicating a failure when writing to an output stream.

Public constructors

ErrorManager()

Constructs an instance of ErrorManager.

Public methods

void error(String message, Exception exception, int errorCode)

Reports an error using the given message, exception and error code.

Inherited methods

From class java.lang.Object

Constants

CLOSE_FAILURE

Added in API level 1
int CLOSE_FAILURE

The error code indicating a failure when closing an output stream.

Constant Value: 3 (0x00000003)

FLUSH_FAILURE

Added in API level 1
int FLUSH_FAILURE

The error code indicating a failure when flushing an output stream.

Constant Value: 2 (0x00000002)

FORMAT_FAILURE

Added in API level 1
int FORMAT_FAILURE

The error code indicating a failure when formatting the error messages.

Constant Value: 5 (0x00000005)

GENERIC_FAILURE

Added in API level 1
int GENERIC_FAILURE

The error code indicating a failure that does not fit in any of the specific types of failures that follow.

Constant Value: 0 (0x00000000)

OPEN_FAILURE

Added in API level 1
int OPEN_FAILURE

The error code indicating a failure when opening an output stream.

Constant Value: 4 (0x00000004)

WRITE_FAILURE

Added in API level 1
int WRITE_FAILURE

The error code indicating a failure when writing to an output stream.

Constant Value: 1 (0x00000001)

Public constructors

ErrorManager

Added in API level 1
ErrorManager ()

Constructs an instance of ErrorManager.

Public methods

error

Added in API level 1
void error (String message, 
                Exception exception, 
                int errorCode)

Reports an error using the given message, exception and error code. This implementation will write out the message to err on the first call and all subsequent calls are ignored. A subclass of this class should override this method.

Parameters
message String: the error message, which may be null.
exception Exception: the exception associated with the error, which may be null.
errorCode int: the error code that identifies the type of error; see the constant fields of this class for possible values.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.