title: How to identify the original Exception of a COMException
body: <p>We have an C#-written Web Application that communicates with an Delphi-written Application via COM. The C# Application invokes Methods of the Delphi Application to get the required data. An <code>COMException</code> will be thrown in our C#-Code when anything went wrong in the Delphi Application. </p>
  
  <p>Here are the details of the <code>COMException</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/EUkGZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EUkGZ.png" alt="enter image description here"></a></p>
  
  <p>Problem: We want to handle these Exceptions dependent on the type of the Delphi-Exception. But we cannot, because it is an COMException every time.</p>
  
  <p>Question: How can we identify or map the originally type of the Delphi Exception in our C#-Code?</p>