Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid endless bogus messages when an exception is raised from outside a context.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 27 Mar 2006 22:33:59 +0000 (22:33 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 27 Mar 2006 22:33:59 +0000 (22:33 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2001 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/context.c

index fd3c271..c01edd4 100644 (file)
@@ -175,7 +175,10 @@ static ex_ctx_t *__context_ex_ctx(void)
 static void __context_ex_terminate(xbt_ex_t *e) {
   xbt_ex_display(e);
 
-  __context_exit(current_context, e->value);
+  if(current_context!=init_context) 
+    __context_exit(current_context, e->value);
+  else
+    abort();
 }
 
 /** \name Functions