Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rework the documentation navigation
[simgrid.git] / include / xbt / ex.h
index ad19546..12f5722 100644 (file)
@@ -72,10 +72,6 @@ typedef struct { __ex_mctx_struct } __ex_mctx_t;
 /** @addtogroup XBT_ex
  *  @brief A set of macros providing exception a la C++ in ANSI C (grounding feature)
  *
- * <center><table><tr><td><b>Top</b>    <td> [\ref index]::[\ref XBT_API]
- *                <tr><td><b>Prev</b>   <td> [\ref XBT_syscall]
- *                <tr><td><b>Next</b>   <td> [\ref XBT_log]            </table></center>
- *
  * This module is a small ISO-C++ style exception handling library
  * for use in the ISO-C language. It allows you to use the paradigm 
  * of throwing and catching exceptions in order to reduce the amount
@@ -92,12 +88,16 @@ typedef struct { __ex_mctx_struct } __ex_mctx_t;
  * These features are brought to you by a modified version of the libex 
  * library, one of the numerous masterpiece of Ralf S. Engelschall.
  *
+ * \htmlonly <div class="toc">\endhtmlonly
+ *
  * @section XBT_ex_toc TABLE OF CONTENTS
  *
  *  - \ref XBT_ex_intro
  *  - \ref XBT_ex_base
  *  - \ref XBT_ex_pitfalls
  *
+ * \htmlonly </div> \endhtmlonly
+ *
  * @section XBT_ex_intro DESCRIPTION
  * 
  * In SimGrid, an exception is a triple <\a msg , \a category , \a value> 
@@ -408,9 +408,14 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e);
 #define THROW6(c,v,m,a1,a2,a3,a4,a5,a6) _THROW(c,v,bprintf(m,a1,a2,a3,a4,a5,a6))
 
 #define THROW_IMPOSSIBLE     THROW0(unknown_error,0,"The Impossible Did Happen (yet again)")
-#define DIE_IMPOSSIBLE       xbt_assert0(0,"The Impossible Did Happen (yet again)")
 #define THROW_UNIMPLEMENTED  THROW1(unknown_error,0,"Function %s unimplemented",__FUNCTION__)
 
+#ifndef NDEBUG
+#  define DIE_IMPOSSIBLE       xbt_assert0(0,"The Impossible Did Happen (yet again)")
+#else
+#  define DIE_IMPOSSIBLE       exit(1);
+#endif
+
 /** @brief re-throwing of an already caught exception (ie, pass it to the upper catch block) 
  *  @hideinitializer
  */