in a dotnet core application that uses pinvoke and runs on linux, when c++ throws - for example - std::runtime_error
- we get:
terminate called recursively
terminate called after throwing an instance of 'terminate called after throwing an instance of 'std::runtime_error*'
Aborted (core dumped)
even though the invocation of the externed c++ method is wrapped in a try catch block in the managed code.
how can this be caught and treated in the dotnet core managed code?