|
|
|
|
|
by twblalock
3337 days ago
|
|
Error handling, which includes logging the error, should almost always be the responsibility of the caller. Only the caller knows why the call was made, and only the caller knows the impact of the error on what the caller is trying to do. |
|
You run a process that exits with a non-zero code. Is that an error that should be logged? Or just informational? (E.g. `diff`.)
You request an HTTP resource that doesn't exist. Loggable error? Or normal result?
Only the caller knows.