Just for completeness, there’s also someErrableFn() catch |err| { ... } which is useful for capturing the exact error returned by a function. A small example from the Zig docs can be seen here. The resulting error payload can then be used with a switch statement to handle different errors.
4 Likes