User-Friendly Exception Handling

I just posted a new article on Code Project, User Friendly Exception Handling. This is a set of classes that deal with unhandled and handled exceptions through a consistent UI, as presented in Alan Cooper's great book About Face: The Essentials of User Interface Design.

animated screenshot of unhandled exception

Anyway, at the time of the unhandled exception, here's what you get for free:

  • Display an automatic, Cooper-Approved(tm) exception interface
  • Capture a screenshot of the user's desktop
  • Build a string containing comprehensive diagnostic information
  • Notify the developers via SMTP e-mail, and attach the screenshot
  • Write an event to the event log
  • Write a plain-text exception log in the application folder

I have used the hell out of this code and it works like gangbusters. There's nothing like an extremely tight loop between developers and exceptions to facilitate quick, responsive fixes to broken code. And since we have it set up to email every team member for every Unhandled Exception – it's a therapeutic form of punishment, too!

Also, if anyone is interested in those animated GIF screenshots – I had been looking for a simple tool to do this for literally years – it's the archaic 1997 version of GifgIfgiF. Extremely old-school, but it still works great and generates very tiny, ultra-compatible animated Gifs. Of course you'll want to turn off all the crazy XP theming and revert to 256-color friendly Win2k style forms before you generate these kinds of Gif animations, too.

Related posts

Because Reading is Fundamental

Because Reading is Fundamental

Most discussions show a bit of information next to each user: What message does this send? * The only number you can control printed next to your name is post count. * Everyone who reads this will see your current post count. * The more you post, the bigger that number next to

By Jeff Atwood ·
Comments

The “Just In Time” Theory of User Behavior

I’ve long believed that the design of your software has a profound impact on how users behave within your software. But there are two sides to this story: * Encouraging the “right” things by making those things intentionally easy to do. * Discouraging the “wrong” things by making those things intentionally

By Jeff Atwood ·
Comments

For a Bit of Colored Ribbon

For the last year or so, I've been getting these two page energy assessment reports in the mail from Pacific Gas & Electric, our California utility company, comparing our household's energy use to those of the houses around us. Here's the relevant excerpts from

By Jeff Atwood ·
Comments

Are You a Digital Sharecropper?

Will Work for Praise: The Web's Free-Labor Economy [https://www.bloomberg.com/news/articles/2008-12-28/will-work-for-praise-the-webs-free-labor-economybusinessweek-business-news-stock-market-and-financial-advice] describes how many of today's websites are built by the users themselves: > It's dawn at a Los Angeles apartment overlooking the Hollywood Hills. Laura Sweet, an advertising

By Jeff Atwood ·
Comments

Recent Posts

Stay Gold, America

Stay Gold, America

We are at an unprecedented point in American history, and I'm concerned we may lose sight of the American Dream.

By Jeff Atwood ·
Comments
The Great Filter Comes For Us All

The Great Filter Comes For Us All

With a 13 billion year head start on evolution, why haven’t any other forms of life in the universe contacted us by now? (Arrival is a fantastic movie. Watch it, but don’t stop there – read the Story of Your Life novella it was based on for so much

By Jeff Atwood ·
Comments
I Fight For The Users

I Fight For The Users

If you haven’t been able to keep up with my blistering pace of one blog post per year, I don’t blame you. There’s a lot going on right now. It’s a busy time. But let’s pause and take a moment to celebrate that Elon Musk

By Jeff Atwood ·
Comments
The 2030 Self-Driving Car Bet

The 2030 Self-Driving Car Bet

It’s my honor to announce that John Carmack and I have initiated a friendly bet of $10,000* to the 501(c)(3) charity of the winner’s choice: By January 1st, 2030, completely autonomous self-driving cars meeting SAE J3016 level 5 will be commercially available for passenger use

By Jeff Atwood ·
Comments