openupm-cli
openupm-cli copied to clipboard
refactor: de-result unexpected errors
Currently most functions in the project use Result
based return types. When I started to implement this I was of the opinion that all functions should use the Result
based workflow to allow for railway oriented programming.
In the course of refactoring this project to use Result
s I sometimes had a feeling that maybe some types of errors are not suitable to be used in Result
s. Recently I read this blog post which confirmed my suspicions and enhanced my understanding of error handling.
In this PR I revert my over-zealous usage of Result
s. They should now only be used for handle-able domain errors.