I’m using Hydra to access C# non visual code from a Delphi host application and it works just fine.
However, on some occasions, the C# code can throw exceptions that inherit from a common base type, say
On the Delphi side, I would like to distinguish between those exceptions like so:
try Plugin.CallMethod; except on E: MyPluginException do Process(E); end;
So that, exceptions that derive from
MyPluginException are processed while any other exception is left untouched.
However, right now, I’m not getting any specific type for these exceptions, they all are raised as
EOleException without any details.
I mean, sure, there is the message, but I’m missing the source C# exception name and its associated stack trace. The former would allow me to do a switch while the latter would allow me to give more details to our support team (we are using madExcept for the Delphi side, for instance).
Is this something that is feasible? If yes, how would you suggest that I do it?