Skip to main content

Module crash

Module crash 

Source
Expand description

§Crash log

A panic in the TUI writes a crash log and tells the user where it is. The hook first gives the terminal back (screen::restore, which does nothing when the screen is already back), so the notice is readable, then calls the previous hook.

Functions§

write_crash_log
Writes crash-<timestamp>.log in dir: the panic message and location, a backtrace, and the redacted journal tail. The name has milliseconds and the process id, so two crashes do not overwrite each other. Returns the file path.