Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
only dupplicate the procname when dealing with remote processes; cleanup the free...
[simgrid.git] / include / xbt / ex.h
index 597ce19..457047b 100644 (file)
@@ -411,18 +411,19 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e);
  */
 
 #define _THROW(c,v,m) \
  */
 
 #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.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)
 
      DO_THROW(__xbt_ex_ctx()->ctx_ex);\
   } while (0)