summaryrefslogtreecommitdiffstats
path: root/struct.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-11 06:35:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-11 06:35:47 -0700
commit225ff2fa2fdb9e5169db5e2c06dc3b0053b775bb (patch)
treec6a4be8b27d08932de58adaf9b5a88660d14eeea /struct.h
parent05590e5f83f2e656add3b3a3e3f4b76eaa2d6f91 (diff)
downloadtxr-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 'struct.h')
0 files changed, 0 insertions, 0 deletions