Reputation: 673
I am calling a .Net assembly from a Delphi project using COM interop.
Can I catch .Net exceptions in Delphi thrown by the assembly?
Upvotes: 2
Views: 416
Reputation: 7062
COM does not work with .NET exceptions but with HRESULT
values. So there is no way you can catch .NET exceptions at Delphi side. You just receive a HRESULT with an error value. If you are lucky you will get an HRESULT with a specific error value so you know what has gone wrong, if you're unlucky, you will get some generic HRESULT value.
Upvotes: 3