From 4bc7b5b123ea15322dd5d6a908fe660f542fb1c3 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 2 Jul 2022 09:50:37 -0400 Subject: [PATCH] main: add panic handler Signed-off-by: Xe Iaso --- src/main.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.zig b/src/main.zig index 66e81e0..1f26b96 100644 --- a/src/main.zig +++ b/src/main.zig @@ -392,3 +392,10 @@ fn draw_mara() void { w4.blitSub(&sprites.Mara, @intCast(u32, mara_box.base.x), @intCast(u32, mara_box.base.y), 16, 16, 16 * (frame + step), 0, 96, flags); } + +pub fn panic(msg: []const u8, st: ?*std.builtin.StackTrace) noreturn { + _ = st; + w4.trace("!!! PANIC !!!"); + w4.trace(msg); + while (true) {} +}