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
Loading
Please register or sign in to comment