Catching non-UI threads' exceptions.

B

BLUE

I'm using CF 1.x (VS 2003) on a Windows CE 4.2 device.

This classes ad methods are not present:

Application.ThreadException
ThreadExceptionEventHandler
Application.SetUnhandledExceptionMode
UnhandledExceptionMode
AppDomain.CurrentDomain.UnhandledException
UnhandledExceptionEventHandler

How can I catch the exceptions throwns by threads I've created?
I've to insert in each thread a try{ /*...*/} catch{}?
If a thread creates another thread both should have try{ /*...*/} catch{}?


Thanks,
Luigi.
 
C

Carl Daniel [VC++ MVP]

BLUE said:
I'm using CF 1.x (VS 2003) on a Windows CE 4.2 device.

This classes ad methods are not present:

Application.ThreadException
ThreadExceptionEventHandler
Application.SetUnhandledExceptionMode
UnhandledExceptionMode
AppDomain.CurrentDomain.UnhandledException
UnhandledExceptionEventHandler

How can I catch the exceptions throwns by threads I've created?
I've to insert in each thread a try{ /*...*/} catch{}?
If a thread creates another thread both should have try{ /*...*/}
catch{}?

Yes - you need a try/catch around the internals of each thread that you
create.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top