3 ms·
good error/failure framework: - should be obvious which functions can fail and what errors they can fail with - propogating an error up the stack should be vi
by randyrand 8y ago
good error/failure framework:
- should be obvious which functions can fail and what errors they can fail with
- propogating an error up the stack should be visible in the code and semantically easy to do
- errors should be composable and easy to add additional information to
- deciding to not handle a error should be explicit and otherwise produce a warning
- errors should be fast and cheap to return errors
- (maybe nice to have) ability for a function to have and return multiple errors