Update 033_iferror.zig
This commit is contained in:
parent
84c9c4072c
commit
32ff7cf42a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue