1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* throw.c (scm_ithrow): Abort when scm_i_critical_section_level is

not zero.
This commit is contained in:
Marius Vollmer 2005-03-07 21:40:19 +00:00
parent 8b7f0bb35b
commit 54f2445baa

View file

@ -20,6 +20,7 @@
#include <stdio.h>
#include "libguile/_scm.h"
#include "libguile/async.h"
#include "libguile/smob.h"
#include "libguile/alist.h"
#include "libguile/eval.h"
@ -586,6 +587,12 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED)
SCM dynpair = SCM_UNDEFINED;
SCM winds;
if (scm_i_critical_section_level)
{
fprintf (stderr, "throw from within critical section.\n");
abort ();
}
/* Search the wind list for an appropriate catch.
"Waiter, please bring us the wind list." */
for (winds = scm_i_dynwinds (); scm_is_pair (winds); winds = SCM_CDR (winds))