2 ms·
I do not think that these 2 extremes are the only options. You can look at Erlang's error handling for an example that both simple and easy to use, yet provides
by StreamBright 7y ago
I do not think that these 2 extremes are the only options. You can look at Erlang's error handling for an example that both simple and easy to use, yet provides the right amount of information. You do not need to pass error codes either. I usually have a structure that is not too deep and at the bottom there are more specific errors that can be logged very close to the codebase where the error happened and propagate only error or ok to the caller. Even with large codebases this is pretty manageable.