Update 024_errors4.zig

This commit is contained in:
Dave Gauer 2021-08-28 10:35:40 -04:00 committed by GitHub
parent 71fbe3a07b
commit 116b355210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ const MyNumberError = error{
};
pub fn main() void {
// The "catch 0" below is just our way of dealing with the fact
// that makeJustRight() returns a error union (for now).
// The "catch 0" below is a temporary hack to deal with
// makeJustRight()'s returned error union (for now).
var a: u32 = makeJustRight(44) catch 0;
var b: u32 = makeJustRight(14) catch 0;
var c: u32 = makeJustRight(4) catch 0;