Browse Source

Update 033_iferror.zig

Dave Gauer 4 years ago
parent
commit
1b2b90317c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      exercises/033_iferror.zig

+ 6 - 0
exercises/033_iferror.zig

@@ -15,6 +15,12 @@
 // We'll take it even further and use a switch statement to handle
 // We'll take it even further and use a switch statement to handle
 // the error types.
 // the error types.
 //
 //
+//     if (foo) |value| {
+//         ...
+//     } else |err| switch(err) {
+//         ...
+//     }
+//
 const MyNumberError = error{
 const MyNumberError = error{
     TooBig,
     TooBig,
     TooSmall,
     TooSmall,