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: In the 2.6.0 release we employ the workaround specifying -funwind-tables in our build and as additional options for the user in the NuGet package. I'm going to close the issue as there isn't anything else we can do.
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: In the 2.6.0 release we employ the workaround specifying -funwind-tables in our build and as additional options for the user in the NuGet package. I'm going to close the issue as there isn't anything else we can do.