Monthly Archives: October 2008

An Approach to Exception Handling

[In response to this post, also posted here, asking about guidelines different developers have come up with….  I actually started a response on the site, then realized I was typing an entire essay into a little comment box.]

Guideline #1: Never discard exception information.

You might either wrap the exception and throw the wrapper, or log it somehow — but discarding exception information should always set off loud alarm bells.  Likewise, catching an exception and throwing a new exception is bad if you neglect to wrap the original one — that stack trace is valuable!

Support Firefox, through Internet Explorer

If you’re a web developer (or if you have to use websites that are still IE-only) you might spend time browsing in both Firefox and IE.

You may also have noticed that when you use the toolbar search box in either one, the browser tacks a few extra parameters onto the Google search URL… so they get credit from Google for sending a user their way.  More specifically, they get PAID.  Which is a great way for Mozilla to support continued open source development… but maybe you don’t want your searches in Internet Explorer to be funneling Google’s money off to Microsoft instead, just because you have to use IE now & then.

Well, if you’ve got a mild anti-Microsoft streak and would like to do a little bit extra to fund open source, it’s pretty easy to tweak IE so that it will build your Google searches to credit Firefox, instead of IE.