Today I had problems with handling exceptions in new application. Instead of showing message my application just terminated, and I couldn't find where.
The reason was that Application.ThreadException Event is static event, but handler I assigned to it was not static method. I didn't get any warnings, it just didn't work.
Here I will post problems I and my colleagues met and solutions we found.
Thursday, January 17, 2008
Application.ThreadException Event is static
Subscribe to:
Post Comments (Atom)
1 comment:
This is because Visual Studio catches the exception before you :D
try to run your code outside of visual (run the exe directly)
HTH :D
Post a Comment