I have the following code in a c++/CLI library to catch unmanaged exceptions and rethrow them:
catch(const std::exception &e)
{
String ^errorMessage = String::Format(L"Parser threw exception: {0}", gcnew String(e.what()));
throw gcnew ApplicationException(errorMessage);
}
Is this the best way? I seem to be losing a lot of information this way.