Skip to content

Make exception base class visible in basic_json #525

Description

Let's make the base class of exceptions visible inbasic_json, along parse_error and others. The reason why I think it is useful is that often one wants to catch all exceptions related to a library in order to guarantee that they cannot escape module boundary. It also makes the code future-proof if new exception types are added. Of course, this can be done right now by simply catching nlohmann::detail::exception.

@nlohmann on a personal note, I'm sorry this comes after you've merged user-defined exceptions feature branch. I was traveling for the last couple of months and I did not pay attention. Sorry!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions