What kind of errors can or should be handled by the user facing code?
Ziggit
What kind of errors can or should be handled by the user facing code?
So, lately I have been thinking about API design and this is one of things I can’t really put my finger on it. For the sake of clarity, when I talk about “error” in this post I mean zig errors. Lets say (a hypothetical scenario) in the API there is a function called veryImportantFunction and it can return variety of errors: const VeryImportantFunctionError = error{ OutOfMemory (ofc), InvalidParameter, LostSomethingImportantWhileTheFunctionWasExecuting, SomethingWentWrongWithThe...
0 comments
No comments yet.