X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c887f0caadd5c4a3ca769c84e9f5e732e0853edb..6521142974bf561e632684f99fd1708726e474a0:/include/xbt/ex.h diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 597ce19917..228743b18b 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -411,18 +411,19 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e); */ #define _THROW(c,v,m) \ - do { /* change this sequence into one block */ \ - /* build the exception */ \ - __xbt_ex_ctx()->ctx_ex.msg = (m); \ - __xbt_ex_ctx()->ctx_ex.category = (xbt_errcat_t)(c); \ - __xbt_ex_ctx()->ctx_ex.value = (v); \ - __xbt_ex_ctx()->ctx_ex.remote = 0; \ - __xbt_ex_ctx()->ctx_ex.host = (char*)NULL; \ - __xbt_ex_ctx()->ctx_ex.procname = strdup(xbt_procname()); \ - __xbt_ex_ctx()->ctx_ex.file = (char*)__FILE__; \ - __xbt_ex_ctx()->ctx_ex.line = __LINE__; \ - __xbt_ex_ctx()->ctx_ex.func = (char*)_XBT_FUNCTION; \ + do { /* change this sequence into one block */ \ + /* build the exception */ \ + __xbt_ex_ctx()->ctx_ex.msg = (m); \ + __xbt_ex_ctx()->ctx_ex.category = (xbt_errcat_t)(c); \ + __xbt_ex_ctx()->ctx_ex.value = (v); \ + __xbt_ex_ctx()->ctx_ex.remote = 0; \ + __xbt_ex_ctx()->ctx_ex.host = (char*)NULL; \ + __xbt_ex_ctx()->ctx_ex.procname = (char*)xbt_procname(); \ + __xbt_ex_ctx()->ctx_ex.file = (char*)__FILE__; \ + __xbt_ex_ctx()->ctx_ex.line = __LINE__; \ + __xbt_ex_ctx()->ctx_ex.func = (char*)_XBT_FUNCTION; \ __xbt_ex_ctx()->ctx_ex.used = backtrace((void**)__xbt_ex_ctx()->ctx_ex.bt,XBT_BACKTRACE_SIZE);\ + __xbt_ex_ctx()->ctx_ex.bt_strings = NULL; \ DO_THROW(__xbt_ex_ctx()->ctx_ex);\ } while (0) @@ -508,9 +509,10 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e); #define RETHROW5(msg,a,b,c,d,e) _XBT_PRE_RETHROW msg,a,b,c,d,e _XBT_POST_RETHROW /** @brief Exception destructor */ -void xbt_ex_free(xbt_ex_t *e); +void xbt_ex_free(xbt_ex_t e); void xbt_ex_display(xbt_ex_t *e); +void xbt_display_backtrace(void); /** @} */ #endif /* __XBT_EX_H__ */