Posted By: obrienslalom | Jan 7th @ 7:55 AM
page 1 of 1
Comments: 5 | Views: 893
obrienslalom
obrienslalom
(2 2 2 3) *3 | 3 3 3

Some time ago, I was watching a c9 video where one of the guys being interviewed mentioned that he blogged/ranted about exception handling.  I felt like it might have been Joe Duffy, but I can't seem to find anything on his blog.  Anybody remember who I'm thinking about, or just have an interesting resource on this topic.  I know that it is a vague question...

stevo_
stevo_
Human after all
eric lippert maybe?
IMO

You should have a general exception handler inside the main program loop, and provide a global event/delegate to process unhandled exceptions. You should also provide a mechanism to hook up a default handler (or your own handler) for the global exception delegate. The default delegate  would format the exception into an error dialog which would make available extended exception information. You may also want that dialog to prompt to continue or terminate the process.

Another useful feature would be to define an AbortException to silently break out of a nested chain of delegates. For example on a Button.Click event you could "throw new AbortException()" which would bubble up to the application loop global exception delegate and do nothing, in effect allowing you to break to the next window message.
Charles
Charles
Welcome Change
Chris Brumme's exceptional "dissertation", The Exception Model, is a great (and deep) read on exceptions, generally. Exceptions come up in many of the interviews I do, so it's hard to know which one you're referring to. Too bad we don't have an Exceptions tag, eh? Smiley Here's a good one (C++ related, though generic enough to educate you on the basics of handling exceptions, generally).

C
yeah, that post was pretty cool, I remember (or not) that on that page was something like "If you want more details on exception handling go to Inside Windows Exceptions", that was hosted on technet, if I'm not mistaken, now that was even cooler Tongue Out
page 1 of 1
Comments: 5 | Views: 893
Microsoft Communities