Skip to content
Snippets Groups Projects
  1. Nov 14, 2024
  2. Nov 13, 2024
  3. Nov 12, 2024
  4. Nov 11, 2024
  5. Nov 08, 2024
  6. Nov 07, 2024
  7. Nov 06, 2024
  8. Nov 05, 2024
    • Кирилл Безуглый's avatar
    • Dmitry Ivanov's avatar
      fix: various improvements to the panic hook · 533dcafe
      Dmitry Ivanov authored and Dmitry Ivanov's avatar Dmitry Ivanov committed
      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.
      533dcafe
Loading