summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-03 12:06:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-03 12:06:28 -0800
commit6863ad4c280d0235a7bf21043cc1196bc8655931 (patch)
treedc2dcf55985064cf2910fcecb00d6eeb0cfa9122 /share
parent64a5ae81281d7097801e35767fb8518b4a713c5f (diff)
downloadtxr-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.tl1
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)