summaryrefslogtreecommitdiff
path: root/libguile/__scm.h
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/__scm.h
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/__scm.h')
-rw-r--r--libguile/__scm.h59
1 files changed, 34 insertions, 25 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h
index 2d11ff59d..4af8303ef 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -316,35 +316,44 @@ extern unsigned int scm_async_clock;
scm_error (_key, _subr, _message, _args, _rest)
#define SCM_SYSERROR(_subr) \
- lgh_error (system_error_sym, \
- _subr, \
- "%S", \
- scm_listify (scm_makfrom0str (strerror (errno)), \
- SCM_UNDEFINED), \
- scm_listify (SCM_MAKINUM (errno), SCM_UNDEFINED));
-
-/*
- old version:
- #define SCM_SYSERROR(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- strerror (errno), _subr)
- */
-
- /* equivalent to:
- scm_throw (system_error_sym, \
- scm_listify (scm_makfrom0str (strerror (errno)), \
- scm_makfrom0str (_subr), \
- SCM_UNDEFINED));
- */
+ lgh_error (scm_system_error, \
+ _subr, \
+ "%S", \
+ scm_listify (scm_makfrom0str (strerror (errno)), \
+ SCM_UNDEFINED), \
+ scm_listify (SCM_MAKINUM (errno), SCM_UNDEFINED));
+
+#define SCM_SYSERROR_M(_subr, _message, _args) \
+ lgh_error (scm_system_error, \
+ _subr, \
+ _message, \
+ _args, \
+ scm_listify (SCM_MAKINUM (errno), SCM_UNDEFINED));
+
#ifdef ENOSYS
# define SCM_SYSMISSING(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- strerror (ENOSYS), _subr)
+ lgh_error (scm_system_error, \
+ _subr, \
+ "%S", \
+ scm_listify (scm_makfrom0str (strerror (ENOSYS)), \
+ SCM_UNDEFINED), \
+ scm_listify (SCM_MAKINUM (ENOSYS), SCM_UNDEFINED));
#else
# define SCM_SYSMISSING(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- "missing function", _subr)
+ lgh_error (scm_system_error, \
+ _subr, \
+ "missing function", \
+ scm_listify (SCM_UNDEFINED), \
+ scm_listify (SCM_MAKINUM (0), SCM_UNDEFINED));
#endif
+
+#define SCM_NUM_OVERFLOW(_subr) \
+ lgh_error (scm_num_overflow, \
+ _subr, \
+ "numerical overflow", \
+ scm_listify (SCM_UNDEFINED), \
+ scm_listify (SCM_UNDEFINED));
+
#define SCM_ARGn 0
#define SCM_ARG1 1
#define SCM_ARG2 2
@@ -361,7 +370,7 @@ extern unsigned int scm_async_clock;
* Also, SCM_WNA must follow the last SCM_ARGn in sequence.
*/
#define SCM_WNA 8
-#define SCM_OVFLOW 9
+ /* #define SCM_OVSCM_FLOW 9 */
#define SCM_OUTOFRANGE 10
#define SCM_NALLOC 11
#define SCM_STACK_OVFLOW 12