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:
parent
7b0f1f2ae1
commit
e6729603c0
4 changed files with 135 additions and 6 deletions
|
@ -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))))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue