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:
parent
8b7f0bb35b
commit
54f2445baa
1 changed files with 7 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue