Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.0.0)

E12063-01


oracle.dss.util
Class DefaultErrorHandler

java.lang.Object
  extended by oracle.dss.util.DefaultErrorHandler

All Implemented Interfaces:
java.io.Serializable, ErrorHandler

public class DefaultErrorHandler
extends java.lang.Object
implements ErrorHandler, java.io.Serializable

Default error handler. This is the default implementation of the ErrorHandler interface. This implementation simply dumps messages.

See Also:
Serialized Form

Field Summary
static int SHOW_ALL
          Debug Mode: SHOW_ALL Show all messages.
static int SHOW_ERROR
          Debug Mode: SHOW_ERROR Show error messages.
static int SHOW_LOG
          Debug Mode: SHOW_LOG Show log messages.
static int SHOW_NONE
          Debug Mode: SHOW_NONE Show no debug messages.
static int SHOW_TRACE
          Debug Mode: SHOW_TRACE Show trace messages.

 

Constructor Summary
DefaultErrorHandler()
           

 

Method Summary
 void error(java.lang.Throwable e, java.lang.String _class, java.lang.String routine)
          Responds to trapped exceptions.
protected  java.lang.String getDate()
           
 int getDebugMode()
          Retrieves the debug mode for the error handler.
 void log(java.lang.String message, java.lang.String _class, java.lang.String routine)
          Responds to abnormal conditions that are not trapped exceptions.
 void resetDebugMode()
          Reset the debug mode settings of the DefaultErrorHandler back to the default settings.
 void setDebugMode(int mode)
          Specifies the debug mode for the error handler.
 void trace(java.lang.String message, java.lang.String _class, java.lang.String routine)
          Responds to trace messages.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SHOW_NONE

public static final int SHOW_NONE
Debug Mode: SHOW_NONE Show no debug messages.
See Also:
Constant Field Values

SHOW_ERROR

public static final int SHOW_ERROR
Debug Mode: SHOW_ERROR Show error messages.
See Also:
Constant Field Values

SHOW_LOG

public static final int SHOW_LOG
Debug Mode: SHOW_LOG Show log messages.
See Also:
Constant Field Values

SHOW_TRACE

public static final int SHOW_TRACE
Debug Mode: SHOW_TRACE Show trace messages.
See Also:
Constant Field Values

SHOW_ALL

public static final int SHOW_ALL
Debug Mode: SHOW_ALL Show all messages.
See Also:
Constant Field Values

Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler()

Method Detail

setDebugMode

public void setDebugMode(int mode)
Specifies the debug mode for the error handler. This method also allows user to set multiple debug mode. For example, to display both log messages and trace messages, call setDebugMode (DefaultErrorHandler.SHOW_TRACE+DefaultErrorHandler.SHOW_LOG)
Parameters:
mode - The debug mode for the error handler. Valid values are SHOW_TRACE, SHOW_LOG, SHOW_ERROR, SHOW_NONE , and SHOW_ALL.

getDebugMode

public int getDebugMode()
Retrieves the debug mode for the error handler. This method also allows user to get the debug mode.
Returns:
The debug mode for the error handler.

resetDebugMode

public void resetDebugMode()
Reset the debug mode settings of the DefaultErrorHandler back to the default settings. I.e, with all log, trace, and error messages are displayed.

error

public void error(java.lang.Throwable e,
                  java.lang.String _class,
                  java.lang.String routine)
Responds to trapped exceptions. This method calls the java.util.loging.logp throwing method with the class name, and the routine name. Then it prints the stack trace from the exception.
Specified by:
error in interface ErrorHandler
Parameters:
e - The trapped exception.
_class - The name of the class in which the exception was caught.
routine - The name of the routine in which the exception was caught.

log

public void log(java.lang.String message,
                java.lang.String _class,
                java.lang.String routine)
Responds to abnormal conditions that are not trapped exceptions.
Specified by:
log in interface ErrorHandler
Parameters:
message - A message that identifies the problem.
_class - The name of the class in which the problem occurred.
routine - The name of the routine in which the problem occurred.

trace

public void trace(java.lang.String message,
                  java.lang.String _class,
                  java.lang.String routine)
Responds to trace messages.
Specified by:
trace in interface ErrorHandler
Parameters:
message - A message that describes the accomplishment.
_class - The name of the class in which the accomplishment occurred.
routine - The name of the routine in which the accomplishment occurred.

getDate

protected java.lang.String getDate()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.0.0)

E12063-01


Copyright © 1997, 2008, Oracle. All rights reserved.