| ... | ... | @@ -5091,11 +5091,10 @@ fn deferErrorExample(is_error: bool) !void { |
| 5091 | 5091 | } |
| 5092 | 5092 | } |
| 5093 | 5093 | |
| 5094 | | // The errdefer keyword support also an alternative syntax to capture the |
| 5095 | | // error generated in case of one error. |
| 5094 | // The errdefer keyword also supports an alternative syntax to capture the |
| 5095 | // generated error. |
| 5096 | 5096 | // |
| 5097 | | // This is useful when during the clean up after an error additional |
| 5098 | | // message want to be printed. |
| 5097 | // This is useful for printing an additional error message during clean up. |
| 5099 | 5098 | fn deferErrorCaptureExample() !void { |
| 5100 | 5099 | errdefer |err| { |
| 5101 | 5100 | std.debug.print("the error is {s}\n", .{@errorName(err)}); |