ilya2 Posted February 17, 2005 Posted February 17, 2005 Hi, I have the problems getting original exception after calling COM+ method. Let me describe the situation. I've got 2 COM+ applications, both written in C#. One of them is calling the other one when some event happens, so let's call them listener and processor. The problem is, that the processor's 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.. Quote Ilya
Afraits Posted February 25, 2005 Posted February 25, 2005 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. Quote Afraits "The avalanche has started, it is too late for the pebbles to vote"
ilya2 Posted February 28, 2005 Author Posted February 28, 2005 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, I'm gonna check it. I'm not quite sure if it would work in my COM+ environment (considering object pooling / caching, threads and so), but I'll give it a chance. Quote Ilya
Recommended Posts