summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2000-03-29 01:57:54 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2000-03-29 01:57:54 +0000
commitef18914a94ac81c2b353b93a4d95811a0965ba9c (patch)
tree1b18e094853082e76d51306d5a01841ab12e6018
parentf85a9bcf5fcd8ebf591e0accc0a25e24140d5fad (diff)
downloadguile-ef18914a94ac81c2b353b93a4d95811a0965ba9c.tar.gz
* error.c (scm_error): Don't try to throw an error if
scm_gc_heap_lock is true.
-rw-r--r--libguile/error.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libguile/error.c b/libguile/error.c
index 239bf3bb0..679373715 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -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
* 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 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,
message ? scm_makfrom0str (message) : SCM_BOOL_F,
args,