3 ms·
it is very noisy and hard to see what is happening if you log and return an error at every layer of the stack. Like everything there are exceptions to the rule
by omegabravo 7y ago
it is very noisy and hard to see what is happening if you log and return an error at every layer of the stack.
Like everything there are exceptions to the rule and at times it makes sense to do both, but it shouldn't be the norm.
- JulianMorrison 7y agoI feel like the rule should be 1. If you can handle it, you probably should also log it since you know what it means and what's being done about it. 2. Otherwise, if you can add pertinent information, like for example the fact that the file you couldn't find was supposed to be the SQLite database, but can't handle it here, wrap and return. Do not log. 3. Otherwise, sticky fingers off, pass it up unaltered. Do not log.