authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2020-04-12 18:21:06-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-04-12 18:21:06-04:00
loge009c1596e2db3d6a5819b71b4f607d79a317913
tree3be9686b298f7e99ab0fe36495a26861c6c26552
parenta3b2de1d1ec3a5ad78fed46e69f251e6ee19be50
parent6f5a7b84571b65e921ae6d52bae5a5e4c7e25c4d
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #5014 from nmeum/@panic-path

Update documentation of @panic

1 files changed, 2 insertions(+), 1 deletions(-)

doc/langref.html.in+2-1
...@@ -7694,7 +7694,8 @@ test "call foo" {...@@ -7694,7 +7694,8 @@ test "call foo" {
7694 <p>7694 <p>
7695 Invokes the panic handler function. By default the panic handler function7695 Invokes the panic handler function. By default the panic handler function
7696 calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or7696 calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or
7697 if there is not one specified, invokes the one provided in {#syntax#}std/special/panic.zig{#endsyntax#}.7697 if there is not one specified, the {#syntax#}std.builtin.default_panic{#endsyntax#}
7698 function from {#syntax#}std/builtin.zig{#endsyntax#}.
7698 </p>7699 </p>
7699 <p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.7700 <p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.
7700 However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios:7701 However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios: