From b04103301a98b3522f92882604a2c22c6d6e8e7d Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Mon, 13 Dec 2004 15:23:24 +0000 Subject: dealing with errors; now like this: return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_ADD_PROVIDER_FAILED); --- lasso/xml/tools.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lasso/xml/tools.h') diff --git a/lasso/xml/tools.h b/lasso/xml/tools.h index 72e6fc5c..f20d5af5 100644 --- a/lasso/xml/tools.h +++ b/lasso/xml/tools.h @@ -65,19 +65,21 @@ LASSO_EXPORT char* lasso_sha1(const char *str); char** urlencoded_to_strings(const char *str); -void _debug(GLogLevelFlags level, const char *filename, int line, +int _debug(GLogLevelFlags level, const char *filename, int line, const char *function, const char *format, ...); #if defined LASSO_DEBUG # define debug(format, args...) \ - _debug(G_LOG_LEVEL_DEBUG, __FILE__, __LINE__,__FUNCTION__, format, ##args); + _debug(G_LOG_LEVEL_DEBUG, __FILE__, __LINE__,__FUNCTION__, format, ##args) #else -# define debug(format, ...); +# define debug(format, ...) #endif #define message(level, format, args...) \ - _debug(level, __FILE__, __LINE__, __FUNCTION__, format, ##args); + _debug(level, __FILE__, __LINE__, __FUNCTION__, format, ##args) +#define error_code(level, errorcode, args...) \ + (message(level, lasso_strerror(errorcode), ##args) || errorcode); #ifdef __cplusplus } -- cgit