Replies: 3 comments 3 replies
-
Thanks for reporting this. Statements inside JSONCONS_CATCH (const ser_error&)
{
return result_type(jsoncons::unexpect, conv_errc::conversion_failed );
} |
Beta Was this translation helpful? Give feedback.
-
You've clicked on New Pull Request from https://github.com/danielaparker/jsoncons/pulls? |
Beta Was this translation helpful? Give feedback.
-
You need to fork the repo (click fork on https://github.com/danielaparker/jsoncons), make your changes on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have downloaded jsoncons headers only and I was trying to integrate it into a WASM module. To be able to do that I needed to disable exceptions.
It should work out of the box but it gave me some compilation errors. After going through the code I discovered that a code ammendment is needed in file /include/jsoncons/reflect/json_conv_traits.hpp at line 76. It should look like that:
#if !defined(JSONCONS_NO_EXCEPTIONS)
JSONCONS_CATCH (const ser_error& ec)
{
return result_type(jsoncons::unexpect, ec.code());
}
#endif
Adding those macros disable the catch when exceptions are disabled !! although when exceptions are disabled the macro JSONCONS_CATCH (const ser_error& ec) resolves to "if (false)" yet the compiler complains about the ec.code() reporing that it is undefined.
I need this to be in place so when I clone the repo inside my docker image i do not have to modify it by hand. Another approach is to take a copy of this repo into my account but this will disallow me from getting further updates.
So kindly wither give me access to push my branch and create a pull request, or accomodate the fix in your master branch and letb me know to re-pull it.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions