Skip to content

Throw the original exception; don't create new. #66

@discospiff

Description

@discospiff

It's better to simply throw the existing exception than to catch it, throw it away, and then throw a brand new exception. You're losing the history of the first exception, which is very valuable to identify and solve the problem.

throw new Exception("Error while saving a collection");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions