Re: [xSocket-develop] AbstractEndpoint.HandlerProcessor eats Exceptions
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-11-28 18:22:31
|
Hi Gregor, I agree with you. I'm gonig to fix this. I´m sorry for your pain ;-) Gregor 2008/11/28 gk <gk...@ph...> > Hi.. > > I ran across the following Problem in case a uncaught Exception is > thrown in a IDatagramHandler, like a RuntimeException, it is very very > hard to detect. > The usual way we handle this kind of Exceptions is to register a default > UncaughtExceptionHandler on the Thread class. It contains logic to deal > with the Exception and report them accordingly. > Now in case IDatagramHandler throws such a Exception it is catched and > eaten by run() in AbstractEndpoint.HandlerProcessor. > As far as I know it is not recommended to silently catch away > exceptions, specially for a API used by others this could lead to > confusion and troubles to find errors. Everything appears to be fine > even though errors occur. > I would suggest/recommend to throw the caught Exception again after > handling it. So that it pops up as uncaught exception on the Thread. > This way xSocket API users can see error and handle the Exception > accordingly. > > Regards, > Gregor > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > |