1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

* error.c (scm_error): declare scm_error_callback.

* error.h: prototype for scm_error_callback.

	* __scm.h: define lgh_error.
 	(SCM_SYSERROR): redefine using lgh_error.

	* boot-9.scm (%%handle-system-error): recognise errors thrown
	by lgh-error (fill-message etc.)
This commit is contained in:
Gary Houston 1996-09-07 20:48:45 +00:00
parent cceac91b8b
commit 7cb1d4d305
6 changed files with 111 additions and 21 deletions

View file

@ -191,7 +191,32 @@ scm_wta (arg, pos, s_subr)
return SCM_UNSPECIFIED;
}
void (*scm_error_callback) () = 0;
void
scm_error (key, subr, message, args, rest)
SCM key;
char *subr;
char *message;
SCM args;
SCM rest;
{
SCM arg_list;
if (scm_error_callback)
(*scm_error_callback) (key, subr, message, args, rest);
arg_list = scm_listify (scm_makfrom0str (subr),
scm_makfrom0str (message),
args,
rest,
SCM_UNDEFINED);
scm_ithrow (key, arg_list, 1);
/* No return, but just in case: */
write (2, "unhandled system error", sizeof ("unhandled system error") - 1);
exit (1);
}
#ifdef __STDC__
void