mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Fix a confusing comment in langref.html.in
This commit is contained in:
parent
54ea0bbcdd
commit
c13ac52972
1 changed files with 3 additions and 4 deletions
|
|
@ -5091,11 +5091,10 @@ fn deferErrorExample(is_error: bool) !void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The errdefer keyword support also an alternative syntax to capture the
|
// The errdefer keyword also supports an alternative syntax to capture the
|
||||||
// error generated in case of one error.
|
// generated error.
|
||||||
//
|
//
|
||||||
// This is useful when during the clean up after an error additional
|
// This is useful for printing an additional error message during clean up.
|
||||||
// message want to be printed.
|
|
||||||
fn deferErrorCaptureExample() !void {
|
fn deferErrorCaptureExample() !void {
|
||||||
errdefer |err| {
|
errdefer |err| {
|
||||||
std.debug.print("the error is {s}\n", .{@errorName(err)});
|
std.debug.print("the error is {s}\n", .{@errorName(err)});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue