1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

* error.c (scm_error): Don't try to throw an error if

scm_gc_heap_lock is true.
This commit is contained in:
Mikael Djurfeldt 2000-03-29 01:57:54 +00:00
parent f85a9bcf5f
commit ef18914a94

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. /* Copyright (C) 1995,1996,1997,1998, 2000 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -74,6 +74,14 @@ void
scm_error (SCM key, const char *subr, const char *message, SCM args, SCM rest) scm_error (SCM key, const char *subr, const char *message, SCM args, SCM rest)
{ {
SCM arg_list; SCM arg_list;
if (scm_gc_heap_lock)
{
/* The error occured during GC --- abort */
fprintf (stderr, "Error in %s during GC: %s\n",
subr ? subr : "unknown function",
message ? message : "<empty message>");
abort ();
}
arg_list = scm_listify (subr ? scm_makfrom0str (subr) : SCM_BOOL_F, arg_list = scm_listify (subr ? scm_makfrom0str (subr) : SCM_BOOL_F,
message ? scm_makfrom0str (message) : SCM_BOOL_F, message ? scm_makfrom0str (message) : SCM_BOOL_F,
args, args,