Constant panic [src]

This namespace is used by the Zig compiler to emit various kinds of safety panics. These can be overridden by making a public panic namespace in the root source file.

Type

type

Source

pub const panic: type = p: { if (@hasDecl(root, "panic")) { if (@TypeOf(root.panic) != type) { // Deprecated; make `panic` a namespace instead. break :p std.debug.FullPanic(struct { fn panic(msg: []const u8, ra: ?usize) noreturn { root.panic(msg, @errorReturnTrace(), ra); } }.panic); } break :p root.panic; } break :p switch (builtin.zig_backend) { .stage2_powerpc, .stage2_riscv64, => std.debug.simple_panic, else => std.debug.FullPanic(std.debug.defaultPanic), }; }