Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trapping Errors OUTSIDE of Try...Catch Block

0 views
Skip to first unread message

Jesse

unread,
Jun 23, 2004, 11:13:51 AM6/23/04
to
It is not feasible to place every piece of code i write within a
'try...catch' block. So how should I handle errors that occurr ouside of a
try...catch block?

In the full-scale framework I can add the following handlers to my
application to capture and handle such errors:

AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf
MyCatchAllExceptionHandler
AddHandler Application.ThreadException, AddressOf
MyCatchAllExceptionHandler

How would I do something similar in the Compact Framework?

Thank you!


Trollpower

unread,
Jun 24, 2004, 4:04:53 AM6/24/04
to
Hi Jesse,

sorry, but i cant help you on this, but can you give me some tipps on
how to react in the EventHandler if such a Exception occurs? I tried
your code and it worked, but the Application exits after handling the
event.

Thanks in advance

Jens


"Jesse" <jauf...@cascodev.com> wrote in message news:<uLJkySTW...@tk2msftngp13.phx.gbl>...

Leigh McCulloch

unread,
Jun 18, 2009, 9:27:08 PM6/18/09
to
I'm trying to find a solution to this missing Application.ThreadException as well. I'm using AppDomain.UnhandledException in CF2.0, but exceptions occurring in the message loop thread are still being gobbled up and then Application.Run just exits, with no exceptions being sent to anyone.

From http://www.developmentnow.com/g/18_2004_6_0_0_98437/Trapping-Errors-OUTSIDE-of-Try--Catch-Block.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

0 new messages