diff options
author | Dave Gauer <ratfactor@gmail.com> | 2021-08-28 10:57:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-28 10:57:51 -0400 |
commit | 32ff7cf42a7fea8da525f1d00d89dce9d44c95b7 (patch) | |
tree | a865c286d031586d53f77f87491f87f03b37dc19 /exercises/033_iferror.zig | |
parent | 84c9c4072c2963719f09cdf0976445172c2ef112 (diff) | |
download | ziglings-32ff7cf42a7fea8da525f1d00d89dce9d44c95b7.tar.gz ziglings-32ff7cf42a7fea8da525f1d00d89dce9d44c95b7.tar.bz2 ziglings-32ff7cf42a7fea8da525f1d00d89dce9d44c95b7.tar.xz ziglings-32ff7cf42a7fea8da525f1d00d89dce9d44c95b7.zip |
Update 033_iferror.zig
Diffstat (limited to 'exercises/033_iferror.zig')
-rw-r--r-- | exercises/033_iferror.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/exercises/033_iferror.zig b/exercises/033_iferror.zig index 2aacc1e..f281b8d 100644 --- a/exercises/033_iferror.zig +++ b/exercises/033_iferror.zig @@ -15,6 +15,12 @@ // We'll take it even further and use a switch statement to handle // the error types. // +// if (foo) |value| { +// ... +// } else |err| switch(err) { +// ... +// } +// const MyNumberError = error{ TooBig, TooSmall, |