> Try catch all the potential throwable methods I am afraid. Or use CF 2.0 if
> that is acceptable given the November release date.
in this case.
throughout my code. Rather than doing it around all throwable methods,
callbacks passed to an asynchrounous web service call). This should
code. So far it seems to work well.
Daniel Moth wrote:
> > given that the CF doesn't allow for global exception handling, what are
> > the best practices for exception handling?
> Try catch all the potential throwable methods I am afraid. Or use CF 2.0 if
> that is acceptable given the November release date.
>
> Cheers
> Daniel
> --
>
http://www.danielmoth.com/Blog/ >
>
> "Myron Marston" <guitar_melosh@hotmail.com> wrote in message
> news:1122581247.633448.89800@g43g2000cwa.googlegroups.com...
> > Unfortunately, my app is spread across 80+ source files (both VB.Net
> > and C#) in multiple assemblies, so it's a bit difficult to reduce it
> > down to a postable example. I've looked into it some more, however,
> > and discovered the following...
> >
> > - When Message.Box.Show is called from the catch within
> > ApplicationEx.Pump, it returns immediately. This is not the usual
> > behavior of MessageBox.Show.
> > - The next time GetMessage is called, it returns false, causing the
> > message pump loop to exit, and the thread to exit.
> > - My background thread closes on Form.Close(), but since this never is
> > reached it continues running, and my application freezes.
> > - According to
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefgetmessage.asp,
> > GetMessage returns false when a WM_QUIT message is received.
> >
> > So, it appears that when the exception is thrown, WM_QUIT gets sent.
> > Why is this? Can I prevent that from happening? Why would
> > MessageBox.Show return immediately in this case? And more generally,
> > given that the CF doesn't allow for global exception handling, what are
> > the best practices for exception handling?
> >