charon-core  0.3.1
ExceptionHandler Namespace Reference

Routine to simplify exception handling during workflow executions.

Functions

charon_plugins_DLL_PUBLIC int checkRaise (void(&method)())
 execute given function and return EXIT_SUCCESS on exception catch More...
 
charon_plugins_DLL_PUBLIC int run (int(&method)())
 Execute given function and catch exceptions. More...
 
charon_plugins_DLL_PUBLIC int run (void(&method)())
 Execute given function and catch exceptions. More...
 

Function Documentation

int ExceptionHandler::checkRaise ( void(&)()  method)

Exceptions are caught, error message is printed to sout.

Parameters
[in]methodexecution routine
Returns
success on exception catch, fail otherwise

Definition at line 90 of file ExceptionHandler.cpp.

References sout.

int ExceptionHandler::run ( int(&)()  method)

Exceptions are caught, error messages are printed to std::cerr. Exception type is given in error message, on gcc, typename demangling is performed. You may use this as return value of the main() routine.

Parameters
[in]methodexecution routine
Returns
return value of the given function

Definition at line 32 of file ExceptionHandler.cpp.

int ExceptionHandler::run ( void(&)()  method)

Exceptions are caught, error messages are printed to std::cerr. Exception type is given in error message, on gcc, typename demangling is performed. You may use this as return value of the main() routine.

Parameters
[in]methodexecution routine
Returns
success if no exceptions, fail otherwise

Definition at line 59 of file ExceptionHandler.cpp.