Is there Jeff Atwood (or Similiar) exception handling available for C # / Winforms.Net 3.5+?

We have a .Net 3.5 C # / Winforms desktop application with a very limited size / area / user base (40 users). I need a way to gather more information about unhandled exceptions, but I don’t think I need something as large or wide as the Microsoft * exception handling application block. I just need to grab and send.

Is there an exception handler, similar in scope and function, set by Jeff Atwood " Convenient exception handling" for C # in a newer version. Network? (In my case 3.5, but in the end we hope to move to 4 +)

I would like to use ELMAH, but it does not work with Winforms.

Alternatively, can Jeff Atwood exception handling work with C # 3.5 / winforms?

* more precisely, I prefer Mr. Atwood a short 2004 blog post describing his solution and his limited but useful area, according to the wide and vague documentation of another. We should all strive to explain the components well enough for people to ask them to port to another language after 9 years .; -)

+7
source share
3 answers

You can customize the unhandled exception handler, then populate these exceptions from a library, such as ELMAH, but custom from code, because you do not have a web.config file.

We use: http://nuget.org/packages/StackExchange.Exceptional/

Handling Unhandled Exceptions: http://mike.woelmer.com/2009/04/dealing-with-unhandled-exceptions-in-winforms/

+3
source

I have been using my own version of Jeff code for many years. It works great for any purpose I've ever tried.

Is there a reason you don't think this will work?

Just change the goal and rebuild.

+1
source

I use NBug, which also provides exception handling hooks for unhandled exceptions. It works for console, WinForms and WPF,

http://nbug.codeplex.com

0
source

All Articles