Re: exception handling

nummish <[email protected]> Thu, 14 Apr 2005 08:51:11 -0400
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Afaik the expected result is the crash. I don't know if there's a good
way to put a single blanket exception handler for the app, but instead
consider putting them in each event handler.

On 4/13/05, Greg Hewgill <[email protected]> wrote:
> The exception is being thrown by my code (null pointer exception or whatever). If I add a try/catch around the specific code, it gets caught as expected. However, if I let the exception propagate back to the caller of my code, the thread will be terminated.
> 
> I've seen other UI frameworks where the exception will be caught by the top level message loop within the framework, and by default logged and ignored. The user may set up a specific function to handle exceptions if the behaviour needs to be different.
> 
> What is the expected result for wx.NET?
> 
> Greg Hewgill
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of nummish
> Sent: Wednesday, April 13, 2005 15:56
> To: [email protected]
> Subject: Re: [Wxnet-users] exception handling
> 
> Is the exception being thrown by your code? or code internal to the
> wx.NET library?
> 
> Does it escape a blanket try/catch (general case System.Exception)?
> 
> On 4/13/05, Greg Hewgill <[email protected]> wrote:
> > What happens to exceptions thrown from within code called by wx.NET? I'm running into a problem where if my code happens to throw an exception from within my derived wx.Frame constructor, the program uncerimoniously aborts without any message.
> >
> > It appears that throwing an exception from within .NET code causes the UI thread to be terminated. Is there a way to change this behaviour?
> >
> > Greg Hewgill
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_ide95&alloc_id396&opclick
> > _______________________________________________
> > wxnet-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wxnet-users
> >
> 
> --
> Bigger 1:23
> This address if for mailing list traffic only.
> Please direct non-list correspondence to 0x90.org
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> wxnet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wxnet-users
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&opclick
> _______________________________________________
> wxnet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wxnet-users
> 


-- 
Bigger 1:23
This address if for mailing list traffic only. 
Please direct non-list correspondence to 0x90.org


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click