Trapping Errors OUTSIDE of Try...Catch Block

  • Thread starter Thread starter Jesse
  • Start date Start date
J

Jesse

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!
 
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
 
Back
Top