I lose InnerException at calling COM+

ilya2

Active member
Joined
Apr 13, 2004
Messages
29
Location
Slovakia
Hi, I have the problems getting original exception after calling COM+ method.

Let me describe the situation.

Ive got 2 COM+ applications, both written in C#. One of them is calling the other one when some event happens, so lets call them listener and processor. The problem is, that the processors method may result in an exception.

The listener should then catch this exception and report it.
However, the listener only gets "Exception has been thrown by the target of an invocation". Normally, I would look for the exception in InnerException, but hey, there is nothing in my case!

Can anybody help me with this?
Thanks in advance..
 
A method I used when dealing with errors in classes and com objects in VB6 is to store the exception within the object (in this case your processor) and provide a method to retrieve the exception. The listener can then call this method to retrieving the original exception for you to manipulate as required.

If your exception handling is strucutred appropriately, this methodology of retreiving the exceptions should solve your problem.
 
Afraits said:
A method I used when dealing with errors in classes and com objects in VB6 is to store the exception within the object (in this case your processor) and provide a method to retrieve the exception. The listener can then call this method to retrieving the original exception for you to manipulate as required.

If your exception handling is strucutred appropriately, this methodology of retreiving the exceptions should solve your problem.

Thanks for your reply.
This looks like a solution for me, Im gonna check it. Im not quite sure if it would work in my COM+ environment (considering object pooling / caching, threads and so), but Ill give it a chance.
 
Back
Top