Dec 17

Using C++ Exceptions Effectively

Category: C++, Programming

C++ exceptions are often either ignored or misused. A lot of this is C++’s fault, but it is possible to create high quality, exception safe code by following some basic guidelines. To that end I’ve written an article on using C++ exceptions. It is available in docbook and HTML

The Author

Michael Smit is a software engineer in Seattle, Washington who works for amazon


4 Comments so far

  1. Christine March 31st, 2008 6:53 am

    Your links are broken.

  2. mike March 31st, 2008 7:58 am

    Hmmmm…Well poo. They are now back up.

  3. Christine April 1st, 2008 9:30 am

    Interesting. I’ve mostly used exceptions in Java, where you really can’t avoid them. The C++ implementation really seems to leave a lot to be desired. I remember coming across the issue of not knowing what exceptions to catch in C++. This really makes the exceptions hard to use.

  4. [...] Funnily enough a lot of people think this is a good thing and make snide asides presumably aimed at Java and C#. C++ was designed and standardized by committee rather than an evil empire and I don’t really see that the process has helped things. C++ has a lot of useless features. I would propose the best example of this being exception specifications (see C++ exceptions article). [...]