Skip to content
Snippets Groups Projects
Commit 533dcafe authored by Dmitry Ivanov's avatar Dmitry Ivanov Committed by Dmitry Ivanov
Browse files

fix: various improvements to the panic hook

This patch boils down to the following changes:

* Register the hook for all cli commands (previously only `run`).
* Print the whole text as one log line to prevent splitting.
* Always capture backtrace regardless of RUST_BACKTRACE and such.

Currently, we act under the assumption that every panic is severe
and should abort the whole process. This **does not** have to always
be the case -- for instance, we might recover from a mild panic in
Sbroad's query planner if the application state hasn't been corrupted.
A happy outcome isn't completely ruled out.

In the future we might change this behavior by replacing the
uncompromising global panic hook with a combo of strategically placed
`std::panic::catch_unwind`s and a panic hook for non-unwinding panics.

At the moment of writing, `PanicHookInfo::can_unwind` is still unstable.
parent a31b0ef1
No related branches found
No related tags found
1 merge request!1405fix(test): make test/inner.rs more robust
Pipeline #55050 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment