Skip to content

Improve the code to properly conduct exception chaining #187

@mawiesne

Description

@mawiesne

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions