diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-03 12:06:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-03 12:06:28 -0800 |
commit | 6863ad4c280d0235a7bf21043cc1196bc8655931 (patch) | |
tree | dc2dcf55985064cf2910fcecb00d6eeb0cfa9122 /share | |
parent | 64a5ae81281d7097801e35767fb8518b4a713c5f (diff) | |
download | txr-6863ad4c280d0235a7bf21043cc1196bc8655931.tar.gz txr-6863ad4c280d0235a7bf21043cc1196bc8655931.tar.bz2 txr-6863ad4c280d0235a7bf21043cc1196bc8655931.zip |
Dump deferred warnings when eval exception thrown.
* eval.c (eval-exception): Call uw_dump_deferred_warnings
before throwing exception. The warnings could provide valuable
clues about the cause of the error.
* share/txr/stdlib/error.tl (compile-error): Likewise.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/error.tl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/share/txr/stdlib/error.tl b/share/txr/stdlib/error.tl index 355b39e6..12bda9ae 100644 --- a/share/txr/stdlib/error.tl +++ b/share/txr/stdlib/error.tl @@ -31,6 +31,7 @@ (defun compile-error (ctx fmt . args) (let ((loc (sys:loc ctx)) (name (sys:ctx-name ctx))) + (dump-deferred-warnings *stderr*) (throwf 'eval-error `@loc~s: @fmt` name . args))) (defun compile-warning (ctx fmt . args) |