Problem with exceptions in EventBroker

Topics: CAB & Smart Client Software Factory
Dec 20, 2005 at 7:41 AM
originally posted by: DLorenz

Right now, if an error occurs during an event, the debugger will jump to the publicator. However, the Inner Exception is left blank, so we don't know what the actual error is. We have to manually step through by putting a break point in the EventSubscriber code in order to figure out what is going on. I was wondering if the Inner Exception was supposed to be coming back or not. Thanks.
Dec 20, 2005 at 7:55 AM
originally posted by: BradWilsonMSFT

Because EventBroker is pub/sub, with support for async (background threads), there's really no good way to guarantee good exception data from the publisher.

In general, our recommendation is that any event subscriber that might throw an exception should probably catch for those exceptions, and at least log it for diagnostic purposes, if not swallow it entirely (that depends on the severity of the problem encountered, obviously).