I have some native C++ class libraries that I have wrapped up in C++ .NET which I then call from C# (three layers!).
I can throw exceptions from C++ .NET and happily catch them in C#. The trouble is that the only way I can catch my native C++ exceptions is by catching System.Exception, which is fine but in the conversion from std::exception to System.Exception I lose the vast majority of the information about the error (for example the error message!). I can catch the native exception in the C++ .NET layer and rethrow as a .NET exception but this is an intrusive solution that requires me to place try-catch blocks (to catch the native exceptions and rethrow) around every C++ .NET method call.
Is there an alternative solution to doing this or am I just going to have to get my hands dirty ...