Displaying and capturing c# exceptions

Posted by Frank Meulenaar on Stack Overflow See other posts from Stack Overflow or by Frank Meulenaar
Published on 2010-05-14T08:12:01Z Indexed on 2010/05/14 8:14 UTC
Read the original article Hit count: 254

Filed under:
|
|

I have a c# program which throws a NullReferenceException(). When I start this on my Vista machine, it gives the familiar screen "Foo has stopped working". I can easily click on 'details' to see what went wrong. On one XP machine there's no warning at all: the program just quits, and on another XP I get the "Foo has encountered a problem..." message. Is there a way I can change this (XP's) setting?

Furthermore, I would like to have this error message written to a log file, so I can see what went wrong if somebody else uses my program. Is there a way I can send the uncaught exceptions to a file?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET