mirror of
https://git.aramjonghu.dev/AramJonghu/ziglings.git
synced 2026-09-05 09:43:31 +02:00
Update 033_iferror.zig
This commit is contained in:
committed by
GitHub
co-authored by
GitHub
parent
1c14338573
commit
1b2b90317c
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user