diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-09 06:21:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-09 06:21:10 -0800 |
commit | e2764d75a52f60ea37f4d7aaa5414cc663e7749f (patch) | |
tree | 50e3b9b23f60a7fce8403975a68e40512f8d58b7 | |
parent | 6b5958a0731236ea9c51e0d0b47fb408a14d5d09 (diff) | |
download | txr-e2764d75a52f60ea37f4d7aaa5414cc663e7749f.tar.gz txr-e2764d75a52f60ea37f4d7aaa5414cc663e7749f.tar.bz2 txr-e2764d75a52f60ea37f4d7aaa5414cc663e7749f.zip |
bugfix: no restart catch in compile-warning.
* share/txr/stdlib/error.tl (compile-warning): Wrap throw in a
catch with a continue handler to properly implement the
warning protocol.
-rw-r--r-- | share/txr/stdlib/error.tl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/txr/stdlib/error.tl b/share/txr/stdlib/error.tl index 12bda9ae..f437f863 100644 --- a/share/txr/stdlib/error.tl +++ b/share/txr/stdlib/error.tl @@ -37,7 +37,9 @@ (defun compile-warning (ctx fmt . args) (let ((loc (sys:loc ctx)) (name (sys:ctx-name ctx))) - (throwf 'warning `@loc~s: @fmt` name . args))) + (catch + (throwf 'warning `@loc~s: @fmt` name . args) + (continue ())))) (defun compile-defr-warning (ctx tag fmt . args) (let ((loc (sys:loc ctx)) |