This appears to have nothing to do with the C++ REST SDK as it reproduces easily on with just a basic NativeActivity with exceptions and C++11 turned on calling the following function:
void foo() noexcept // doesn’t fail if noexcept is commented out….
{
try
{
throw std::invalid_argument("hello");
}
catch (...)
{
}
}
The main reason this causes problems is with std::make_exception_ptr which is a noexcept function implemented with a try/catch like above. We need to marshal exceptions to different threads when errors occur in some cases, for example like a network error with the http_client.
Right now we can try to workaround the issue in the library by compiling with the following macros to avoid having parts of the standard library marked with noexcept:
_GLIBCXX_NOEXCEPT=;_GLIBCXX_USE_NOEXCEPT=;_GLIBCXX_THROW(_EXC)=;
Customers will also need to compile their application with this macro to avoid issues as well.
Steve
Comments: Forgot to include this only happens with ARM, and therefore when running on an actual device.
void foo() noexcept // doesn’t fail if noexcept is commented out….
{
try
{
throw std::invalid_argument("hello");
}
catch (...)
{
}
}
The main reason this causes problems is with std::make_exception_ptr which is a noexcept function implemented with a try/catch like above. We need to marshal exceptions to different threads when errors occur in some cases, for example like a network error with the http_client.
Right now we can try to workaround the issue in the library by compiling with the following macros to avoid having parts of the standard library marked with noexcept:
_GLIBCXX_NOEXCEPT=;_GLIBCXX_USE_NOEXCEPT=;_GLIBCXX_THROW(_EXC)=;
Customers will also need to compile their application with this macro to avoid issues as well.
Steve
Comments: Forgot to include this only happens with ARM, and therefore when running on an actual device.