summaryrefslogtreecommitdiff
path: root/libguile/error.c
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>1996-09-14 07:47:50 +0000
committerGary Houston <ghouston@arglist.com>1996-09-14 07:47:50 +0000
commite1724d200d3d1c81e67c5a5b20413f4889a3acce (patch)
tree255da5d11be37884c735e0cbf6a45ca192fd1ba3 /libguile/error.c
parent7d41a049f4e82d4901fb001a6dc403354a91a0f4 (diff)
downloadguile-e1724d200d3d1c81e67c5a5b20413f4889a3acce.tar.gz
* numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
* error.c, error.h: setup scm_num_overflow key. * __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow. Remove definition of SCM_OVSCM_FLOW. * fports.c (scm_open_file): use SCM_SYSERROR_M. * __scm.h: SCM_SYSERROR_M: new macro for system errors with an explicit message and args. * error.c, error.h, __scm.h: change system_error_sym to scm_system_error. * error.c (system_error_sym): remove leading %% from the Scheme name "%%system-error". * __scm.h (SCM_SYSMISSING): Redefine using lgh_error. * boot-9.scm: remove leading %% from references to '%%system-error. (%%handle-system-error): don't pass all the thrown arguments when aborting, just the key and subr. Remove the code to "Install default handlers for built-in errors." Remove the definition of the syserror procedure. Associate 'numerical-overflow with default handler.
Diffstat (limited to 'libguile/error.c')
-rw-r--r--libguile/error.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libguile/error.c b/libguile/error.c
index 440b91a87..d975da9b0 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -57,7 +57,6 @@
/* {Errors and Exceptional Conditions}
*/
-SCM system_error_sym;
/* True between SCM_DEFER_INTS and SCM_ALLOW_INTS, and
* when the interpreter is not running at all.
@@ -167,13 +166,13 @@ scm_everr (exp, env, arg, pos, s_subr)
args = scm_listify (desc, sym, arg, SCM_UNDEFINED);
}
- /* (throw (quote %%system-error) <desc> <proc-name> arg)
+ /* (throw (quote system-error) <desc> <proc-name> arg)
*
* <desc> is a string or an integer (see %%system-errors).
* <proc-name> is a symbol or #f in some annoying cases (e.g. cddr).
*/
- scm_ithrow (system_error_sym, args, 1);
+ scm_ithrow (scm_system_error, args, 1);
/* No return, but just in case: */
@@ -223,6 +222,11 @@ scm_error (key, subr, message, args, rest)
exit (1);
}
+/* error keys: defined here, initialized below, prototyped in error.h,
+ associated with handler procedures in boot-9.scm. */
+SCM scm_system_error;
+SCM scm_num_overflow;
+
#ifdef __STDC__
void
scm_init_error (void)
@@ -231,7 +235,10 @@ void
scm_init_error ()
#endif
{
- system_error_sym = scm_permanent_object (SCM_CAR (scm_intern0 ("%%system-error")));
+ scm_system_error
+ = scm_permanent_object (SCM_CAR (scm_intern0 ("system-error")));
+ scm_num_overflow
+ = scm_permanent_object (SCM_CAR (scm_intern0 ("numerical-overflow")));
#include "error.x"
}