mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Update documentation of @panic
The default panic handler implementation was moved to `builtin.zig`.
This commit is contained in:
parent
8e9e126d41
commit
6f5a7b8457
1 changed files with 2 additions and 1 deletions
|
|
@ -7694,7 +7694,8 @@ test "call foo" {
|
|||
<p>
|
||||
Invokes the panic handler function. By default the panic handler function
|
||||
calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or
|
||||
if there is not one specified, invokes the one provided in {#syntax#}std/special/panic.zig{#endsyntax#}.
|
||||
if there is not one specified, the {#syntax#}std.builtin.default_panic{#endsyntax#}
|
||||
function from {#syntax#}std/builtin.zig{#endsyntax#}.
|
||||
</p>
|
||||
<p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.
|
||||
However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue