Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

xmog_error_handler Class Reference
[Error Handling]

The type responsible for error handling. More...

#include <xmog_error_handler.h>

Collaboration diagram for xmog_error_handler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xmog_error_handler (xmog_options *opts=NULL)
 Creates an error handler instance based on a framework configuration instance.
 xmog_error_handler (const xmog_error_handler &eh)
 Creates an error handler instance based on an existing error handler instance.
 ~xmog_error_handler ()
 Cleans up behind the instance.
xmog_exception_policy set_policy (xmog_exception_policy pol)
 Sets the errorhandling policy.
xmog_exception_policy get_policy ()
 Returns the errorhandling policy.
int handleJavaException (int error_code, xmog_localenv *env=NULL, bool ignore=false)
 Handles a Java exception in the local environment.
int handleFrameworkException (int error_code, const char *msg=NULL, xmog_localenv *env=NULL, bool ignore=false)
 Handles an generic framework exception.

Detailed Description

The type responsible for error handling.

This type is initialized from the runtime options but it also provides a copy constructor because each thread will have to have its own error handler instance. This is necessary because a user must be able to set the errorhandling strategy on a per-thread basis.


Constructor & Destructor Documentation

xmog_error_handler::xmog_error_handler xmog_options opts = NULL  ) 
 

Creates an error handler instance based on a framework configuration instance.

Parameters:
opts the framework initialization instance.

xmog_error_handler::xmog_error_handler const xmog_error_handler eh  ) 
 

Creates an error handler instance based on an existing error handler instance.

Parameters:
eh the prototype for the new error handler.


Member Function Documentation

int xmog_error_handler::handleFrameworkException int  error_code,
const char *  msg = NULL,
xmog_localenv env = NULL,
bool  ignore = false
 

Handles an generic framework exception.

Parameters:
error_code the exception code.
msg the optional error message.
env the local environment in which the exception was thrown.
ignore true if the exception should be ignored, false otherwise. The default value is false.
Returns:
0 if no exception was thrown, non=zero otherwise.

int xmog_error_handler::handleJavaException int  error_code,
xmog_localenv env = NULL,
bool  ignore = false
 

Handles a Java exception in the local environment.

This method can be called safely even if no exception was thrown; in this case it will simply return with a value of 0.

Parameters:
error_code the exception code that is used in cases where no exception is thrown.
env the local environment in which the exception was thrown.
ignore true if the exception should be ignored, false otherwise. The default value is false.
Returns:
0 if no exception was thrown, non=zero otherwise.

xmog_exception_policy xmog_error_handler::set_policy xmog_exception_policy  pol  ) 
 

Sets the errorhandling policy.

Returns:
the previous value of the exception policy.


The documentation for this class was generated from the following file:
Generated on Wed May 31 14:01:23 2006 for Shared Codemesh Runtime Library API Reference by  doxygen 1.4.1