|
|
|
|
|
by lurker137
1393 days ago
|
|
Here is what the static code analyzer Sonar [1] always says for Java: > “In applications where the accepted practice is to log an Exception and then rethrow it, you end up with miles-long logs that contain multiple instances of the same exception. In multi-threaded applications debugging this type of log can be particularly hellish because messages from other threads will be interwoven with the repetitions of the logged-and-thrown Exception. Instead, exceptions should be either logged or rethrown, not both.” 1: https://rules.sonarsource.com/java/RSPEC-2139 |
|