-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Allow overriding JSON_THROW to something else than abort() #938
Labels
kind: enhancement/improvement
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
Comments
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 27, 2018
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 27, 2018
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 27, 2018
That seems like a reasonable extension, but maybe also for |
I thought about that and didn't immediately think of a valid use case, but maybe doing something like
could be useful in debugging scenarios. I'll add and make a PR in a bit |
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 28, 2018
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 28, 2018
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 28, 2018
kaidokert
pushed a commit
to kaidokert/json
that referenced
this issue
Jan 28, 2018
nlohmann
added a commit
that referenced
this issue
Jan 29, 2018
Allow overriding THROW/CATCH/TRY macros with no-exceptions #938
Fixed with merged PR #940. |
nlohmann
added
the
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
label
Jan 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: enhancement/improvement
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Feature Request
On an embedded/rtos system, the stack is compiled without rtti/exceptions, and I'm running http workers in a separate thread. I can deal with failures by basically tearing the thread down and restarting it, however, i don't want to call abort() specifically and unconditionally. Also it's nice to still be able to obtain the error code from the exception
passing a -DJSON_THROW=my_deal_with_json_error(x) at compile time would allow easy customization of how the error handling gets dealt with
The addition is as simple as
The text was updated successfully, but these errors were encountered: