CurrentDomain.UnhandledException doesn't catch Exceptions from other Threads?

J

james

Hi all,

I have a console app that uses
AppDomain.CurrentDomain.UnhandledException. However it only seems to
catch exceptions in the current thread. Exceptions in other threads
(like from a timer) don't seem to get reported at all (and my
application keeps running). How do I catch unhandled exceptions in
other threads?

-James
 
E

Eric Renken

Try this event as well:

Application.ThreadException += new
System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

Eric
 
J

james

Try this event as well:

Application.ThreadException += new
System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

Eric

I thought that was only for windows forms applications?
 

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