|
|
|
|
|
by cturtle
1134 days ago
|
|
In addition to the other answers, this is the most logical way to handle most errors in this specific type of code. The http code in the Zig standard library doesn’t know how the programmer wants to handle all the errors, so it uses try to bubble up any error it doesn’t know how to handle. Why so many uses of try? Because Zig is all about readability, and anytime you see try you _know_ that the called function can possibly fail. |
|