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

Please change assert into throw(maybe) in line 17946 #1841

Closed
beegerous opened this issue Nov 15, 2019 · 3 comments
Closed

Please change assert into throw(maybe) in line 17946 #1841

beegerous opened this issue Nov 15, 2019 · 3 comments
Labels
kind: enhancement/improvement state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated

Comments

@beegerous
Copy link

beegerous commented Nov 15, 2019

  • Describe the feature in as much detail as possible.
    when run a code like:
void test(const nlohmann::json& a) {
    cout << a["a"] << endl;
}
int main() {
    nlohmann::json a;
    test(a);
}

It just assert fail with no log or hint of the error key. When the project is quite complicated, it is hard to know where i got wrong.

@stale
Copy link

stale bot commented Dec 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Dec 15, 2019
@nlohmann
Copy link
Owner

You can check the key in the debugger.

@stale stale bot removed the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Dec 18, 2019
@stale
Copy link

stale bot commented Jan 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Jan 17, 2020
@stale stale bot closed this as completed Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement/improvement state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated
Projects
None yet
Development

No branches or pull requests

2 participants