#include "glite/wmsutils/exception/Exception.h"
#include <pthread.h>
Go to the source code of this file.
Classes | |
class | Exception |
class | LoggingException |
class | OSException |
Defines | |
#define | EXCEPTION_MANDATORY |
#define | STACK_ADD |
#define | throw_exception(context, exception) |
#define | check_result(code, context, desc) if((code)) throw_exception((context), desc) |
|
Utility macro to check result of L&B calls. Checks return value of L&B calls and throws exception if the code failed. |
|
Value: __FILE__, \ __LINE__, \ std::string(CLASS_PREFIX) + __FUNCTION__ This defines the mandatory parameters for all exception constructors (filename, line, method name). |
|
Stacking exceptions. This was originally used for creating the exception chain; now the same result is achieved by adding the nested exception to the constructor parameter list. |
|
Value: { STACK_ADD; \ { \ char *text, *desc; \ int code; \ std::string exc; \ \ code = edg_wll_Error((context), &text, &desc); \ exc = exception; \ if (text) { \ exc += ": "; \ exc += text; \ } \ if (desc) { \ exc += ": "; \ exc += desc; \ } \ free(text); \ free(desc); \ throw LoggingException(EXCEPTION_MANDATORY, \ code, \ exc); \ } \ } This macro is used to obtain the L&B error message and throw the appropriate exception. Note: we can use __LINE__ several times in macro, it is expanded into one row. |