From: alegrand Date: Mon, 27 Mar 2006 22:33:59 +0000 (+0000) Subject: Avoid endless bogus messages when an exception is raised from outside a context. X-Git-Tag: v3.3~3357 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ac7ec891d7a36e741b3a597c60e0dabbd8dbd7ee Avoid endless bogus messages when an exception is raised from outside a context. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2001 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/context.c b/src/xbt/context.c index fd3c271766..c01edd42a2 100644 --- a/src/xbt/context.c +++ b/src/xbt/context.c @@ -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