Codemesh Runtime v3 C++ API Reference
3.9.205
|
The type responsible for error handling. More...
#include <xmog_error_handler.h>
Public Member Functions | |
xmog_error_handler (xmog_options *opts=NULL) | |
Creates an error handler instance based on a framework configuration instance. More... | |
xmog_error_handler (const xmog_error_handler &eh) | |
Creates an error handler instance based on an existing error handler instance. More... | |
~xmog_error_handler () | |
Cleans up behind the instance. | |
xmog_exception_policy | set_policy (xmog_exception_policy pol) |
Sets the errorhandling policy. More... | |
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. More... | |
int | handleFrameworkException (int error_code, const char *msg=NULL, xmog_localenv *env=NULL, bool ignore=false) |
Handles an generic framework exception. More... | |
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.
xmog_error_handler::xmog_error_handler | ( | xmog_options * | opts = NULL | ) |
Creates an error handler instance based on a framework configuration instance.
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.
eh | the prototype for the new error handler. |
int xmog_error_handler::handleFrameworkException | ( | int | error_code, |
const char * | msg = NULL , |
||
xmog_localenv * | env = NULL , |
||
bool | ignore = false |
||
) |
Handles an generic framework exception.
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 . |
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.
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 . |
xmog_exception_policy xmog_error_handler::set_policy | ( | xmog_exception_policy | pol | ) |
Sets the errorhandling policy.