mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
14 lines
279 B
Zig
14 lines
279 B
Zig
const StackTrace = @import("std").builtin.StackTrace;
|
|
pub fn panic(msg: []const u8, stack_trace: ?*StackTrace) noreturn {
|
|
_ = msg;
|
|
_ = stack_trace;
|
|
@breakpoint();
|
|
while (true) {}
|
|
}
|
|
|
|
fn bar() anyerror!void {}
|
|
|
|
export fn foo() void {
|
|
bar() catch unreachable;
|
|
}
|