Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the code to properly conduct exception chaining #187

Open
mawiesne opened this issue Jul 17, 2018 · 2 comments
Open

Improve the code to properly conduct exception chaining #187

mawiesne opened this issue Jul 17, 2018 · 2 comments

Comments

@mawiesne
Copy link
Contributor

mawiesne commented Jul 17, 2018

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.

@reckart
Copy link
Member

reckart commented Jul 17, 2018

Ha, now we have it twice ;) #188 Closing the other one again.

@rzo1
Copy link
Contributor

rzo1 commented Jul 17, 2018

+1 for this improvement.

@reckart reckart modified the milestones: 1.2.1, Feature backlog Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants