diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-11 06:35:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-11 06:35:47 -0700 |
commit | 225ff2fa2fdb9e5169db5e2c06dc3b0053b775bb (patch) | |
tree | c6a4be8b27d08932de58adaf9b5a88660d14eeea /stream.h | |
parent | 05590e5f83f2e656add3b3a3e3f4b76eaa2d6f91 (diff) | |
download | txr-225ff2fa2fdb9e5169db5e2c06dc3b0053b775bb.tar.gz txr-225ff2fa2fdb9e5169db5e2c06dc3b0053b775bb.tar.bz2 txr-225ff2fa2fdb9e5169db5e2c06dc3b0053b775bb.zip |
errors: avoid premature release of deferred warnings.
We don't want to be unconditionally releasing deferred
warnings when error exceptions occur in evaluation or
compilation. The reason is that the error might be handled,
for instance by a speculative expansion. Then unwanted noise
occurs, because deferred warnings have been released
prematurely.
* eval.c (eval_exception): Do not call
uw_release_deferred_warnings here.
(error_trace): But do call uw_release_deferred_warnings here,
before printing anything else. We want to preserve the
behavior that when error information is actually being
printed to a stream, any deferred warnings are dumped first
because they might pertain to the error. (I may revisit
this requirement; perhaps deferred warnings rarely, if ever,
pertain to an error).
* share/txr/stdlib/error.tl (compile-error): Do not dump
deferred warnings unconditionally. Only dump them if we
are also printing the error message to stderr. Secondly, do
not output the error message at all, unless there is no
handler for the error.
Diffstat (limited to 'stream.h')
0 files changed, 0 insertions, 0 deletions