chandrabp / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

jabbernet component OnError event catches the Unhandled Exceptions from the calling application #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I use JabberNet client to design some sort of XmppFeed-listener component. 
So I have it wrapped and compiled as .NET component. 
Among other stuff, I defined the event-handler for Jabber's "OnError" 
event.

Consumer of this component is the vb.net console application. In that 
application I purposely let some exception to be unhandled, but I defined 
the AppDomain.UnhandledException event handler. I expect this method to 
catch all unhandled exceptions.

To my surprise, it turns out when the exception is thrown and not caught 
bu the regular code in the console app, it gets caught by the XmppFeed 
component's OnError event handler.

Is this a normal behavior, and how can I prevent it?

Thanks a lot.

Original issue reported on code.google.com by shon...@hotmail.com on 28 Aug 2009 at 2:58

GoogleCodeExporter commented 8 years ago
I have also observed this behavior in JabberNet 2.1.0.702, when exceptions 
occur in the 
DiscoNodeHandler methods. I would expect methods defined by outside code to 
throw 
exceptions from the client, but maybe from a different event. When the 
Client.OnError 
fires, I would think that is an internal exception, unrelated to my code.

Original comment by theycall...@gmail.com on 30 Mar 2010 at 9:32