feat: more improvements to panic handling

Follow on panics no longer confuse the panic output and the just in
time debugger now works properly on the local tty.
This commit is contained in:
CJ van den Berg 2025-07-03 16:23:29 +02:00
parent 14dce0a10b
commit e9735d9425
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 42 additions and 12 deletions

View file

@ -105,8 +105,8 @@ fn init(allocator: Allocator) InitError!*Self {
var conf, const conf_bufs = root.read_config(@import("config"), allocator);
defer root.free_config(allocator, conf_bufs);
if (conf.start_debugger_on_crash)
tp.install_debugger();
if (@hasDecl(renderer, "install_crash_handler") and conf.start_debugger_on_crash)
renderer.jit_debugger_enabled = true;
const theme_, const parsed_theme = get_theme_by_name(allocator, conf.theme) orelse get_theme_by_name(allocator, "dark_modern") orelse return error.UnknownTheme;
conf.theme = theme_.name;