error{} is fast return with syntax support
Exceptionin Java/JavaScript/C#error{}in Zig
Those are fast returns with syntax support from the language.
They have nothing to do with the meaning of “error” or “exception”.
The naming is archaic, just like void in Zig is Unit in Lean.
Use this feature to create fast return paths for any purpose.
I still don’t understand Zig…