aboutsummaryrefslogtreecommitdiff
path: root/src/zilch/panic.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-26 09:23:55 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-26 09:23:55 +0100
commit91d9b6992ac0ebee13704a3faefa8fd41a00075e (patch)
treeea0a30cc0cfb2232d3e60c845c20a67b6cdf0b99 /src/zilch/panic.zig
parent65300a13dcd11037218bf8ba61efd8ca19e5920e (diff)
zilch: dynamic element creation
Diffstat (limited to 'src/zilch/panic.zig')
-rw-r--r--src/zilch/panic.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/zilch/panic.zig b/src/zilch/panic.zig
new file mode 100644
index 0000000..7163c6d
--- /dev/null
+++ b/src/zilch/panic.zig
@@ -0,0 +1,9 @@
+const log = @import("log/root.zig");
+const std = @import("std");
+
+fn defaultPanic(msg: []const u8, _: ?usize) noreturn {
+ log.js.err(msg);
+ @trap();
+}
+
+pub const panic = std.debug.FullPanic(defaultPanic);