Dec 17
Using C++ Exceptions Effectively
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 Michael Smit is a software engineer in Maryland who currently develops software for spacecraft, spacecraft simulators, and spacecraft control systems.
The Author
4 Comments so far
Leave a comment
Your links are broken.
Hmmmm…Well poo. They are now back up.
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.
[...] 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). [...]