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

Make exception base class visible in basic_json #525

Closed
ghost opened this issue Mar 20, 2017 · 1 comment
Closed

Make exception base class visible in basic_json #525

ghost opened this issue Mar 20, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 20, 2017

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!

@ghost ghost changed the title Make exception base class visible in basic_json Make exception base class visible in basic_json Mar 20, 2017
@nlohmann nlohmann added this to the Release 3.0.0 milestone Mar 20, 2017
@nlohmann
Copy link
Owner

Fixed by merging #526.

@nlohmann nlohmann self-assigned this Mar 22, 2017
nlohmann added a commit that referenced this issue Mar 22, 2017
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

1 participant