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 | 6856043e8561982c6e86524cbdbab38b17a6d817 (patch) | |
tree | 50e3b9b23f60a7fce8403975a68e40512f8d58b7 | |
parent | 9ed8ee8d07c68a5775f8f5f2d0fc3dfb5e440d4e (diff) | |
download | txr-6856043e8561982c6e86524cbdbab38b17a6d817.tar.gz txr-6856043e8561982c6e86524cbdbab38b17a6d817.tar.bz2 txr-6856043e8561982c6e86524cbdbab38b17a6d817.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)) |