-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Within PR #182 we identified an old piece of code that constructed a new Exception dropping the original exception originally catched. Instead of chaining both, important information could have got lost.
This is a separate concern and should be checked throughout the whole codebase, so lost information is reduced and code is cleaned up.
Quoting @reckart's requirements here:
When an exception is caught and a new exception is generated, the old exception should be chained into the new one (unless there is a very good reason not to do it and this should be document in a code comment).
Also, when an exception is handled and thrown up/chained into a new exception, it should normally be unnecessary to log it because it should be expected that the exception is handled again at a higher level leading to the problem likely being logged twice.
@tgalery / @rzo1 feel free to leave comments in below this issues with spots of improper exception chaining.