1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

* libguile/eval.c (s_bad_expression, syntax_error_key, syntax_error,

ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.

	(scm_m_and): Use ASSERT_SYNTAX to signal syntax errors.  Avoid
	unnecessary consing when creating the memoized code.

	* test-suite/lib.scm (run-test-exception): Handle syntax errors.
This commit is contained in:
Dirk Herrmann 2003-10-10 21:49:27 +00:00
parent 7b0f1f2ae1
commit e6729603c0
4 changed files with 135 additions and 6 deletions

View file

@ -323,6 +323,13 @@
(string-match (cdr exception)
(apply simple-format #f message (car rest))))
#t)
;; handle syntax errors which use `syntax-error' for key and don't
;; yet format the message and args (we have to do it here).
((and (eq? 'syntax-error (car exception))
(list? rest)
(string-match (cdr exception)
(apply simple-format #f message (car rest))))
#t)
;; unhandled; throw again
(else
(apply throw key proc message rest))))))))