summaryrefslogtreecommitdiffstats
path: root/eval.c
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 /eval.c
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 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 87266f17..1c5855ae 100644
--- a/eval.c
+++ b/eval.c
@@ -225,6 +225,8 @@ noreturn static void eval_exception(val sym, val ctx, val fmt, va_list vl)
(void) vformat(stream, fmt, vl);
+ uw_dump_deferred_warnings(std_error);
+
uw_throw(sym, get_string_from_stream(stream));
}