Exception-Safe Coding

Bibliography

Dave Abrahams

Abrahams, D. (2008, July 30). Exception-Safety in Generic Components. Retrieved August 17, 2008, from Boost: http://www.boost.org/community/exception_safety.html

Dave developed the three exception-safety guarantees.

Becker, P. (2006). The C++ Standard Library Extensions: A Tutorial and Reference. Addison-Wesley Professional.

This volume covers the TR1 libraries including shared_ptr, function, and bind. Note that this is a better reference than tutorial.

Cargil article

Cargill, T. (1994, November-December). Exception Handling: A False Sense of Security. (S. B. Lippman, Ed.) C++ Report , 6 (9), pp. 21-24.

This is the original publication of the article that signaled that the industry as a whole had an un-addressed Exception-Safety problem.

Cargill, T. (1996). Exception Handling: A False Sense of Security. In S. B. Lippman, & S. B. Lippman (Ed.), C++ Gems: Programming Pearls from The C++ Report (pp. 423-431). Cambridge University Press.

The Cargill article was reprinted here and is also on MeyersŐ Effective C++ CD mentioned below. It is also available on-line here: http://www.informit.com/content/images/020163371x/supplements/Exception_Handling_Article.html

Ellis, M. A., & Stroustrup, B. (1990). The Annotated C++ Reference Manual. Addison-Wesley Professional.

This book is dated and is therefore not generally recommended for understanding the current language. Chapter 15 covers Exceptions and it and Section 18.1.2 document that exceptions were latecomers to the C++ language definition.

Karlsson, B. (2005). Beyond the C++ Standard Library: An Introduction to Boost. Addison-Wesley Professional.

This book offers tutorial coverage of some of Boost libraries that were the basis of some of the TR1 libraries including shared_ptr, function, and bind.

Meyers, S. (2005). Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition ed.). Addison-Wesley Professional.

Of particular interest: Items 8, 13, 17, 25, 26, 29, and 52.

Meyers, S. (1996). More Effective C++: 35 New Ways to Improve Your Programs and Designs. Addison-Wesley Professional.

Of particular interest: Items 9 - 14, (Item 15 is out of date.)

Meyers, S. (1998). Effective C++ CD: 85 Specific Ways to Improve Your Programs and Designs. (CDR Edition). Addison-Wesley Professional.

This CD offers all the content of the Effective C++ (2nd Edition) and More Effective C++, as well as a handful of important articles including: "Exception Handling: A False Sense of Security" by Tom Cargill, "Coping with Exceptions" by Jack W. Reeves, and "Exception-Safe Generic Containers" by Herb Sutter.

Stroustrup, B. (2000). The C++ Programming Language: Special Edition. Addison-Wesley Professional.

Of particular interest: Chapter 14 and Sections 8.3, 21.3.6, 19.3.1, and A10.

Stroustrup, B. (1994). The Design And Evolution of C++. Addison-Wesley Professional.

Of particular interest: Section 16.9.1.

Sutter, H. (1999) Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions. (B. Stroustrup, Ed.) Addison-Wesley Professional.

Of particular interest: Items 8-19.

Sutter, H. (2001). More Exceptional C++: 40 New Engineering Puzzles, Programming Problems, and Solutions. (B. Stroustrup, Ed.) Addison-Wesley Professional.

Of particular interest: Items 17-23.

Sutter, H. (2004). Exceptional C++ Style: 40 New Engineering Puzzles, Programming Problems, and Solutions. (B. Stroustrup, Ed.) Addison-Wesley Professional.

Of particular interest: Items 11-13.

Sutter, H., & Alexandrescu, A. (2004). C++ Coding Standards: 101 Rules, Guidelines, and Best Practices. (B. Stroustrup, Ed.) Addison-Wesley Professional.

Of particular interest: Items 51, 56, 62, and 71-75.

An Example

Nitrogen is an example of a C++ wrapper on a C-API that safely uses exceptions to handle errors and responsibility management.

Lisa Lippincott

Nitrogen is an example of a C++ wrapper on a C-API that safely uses exceptions to handle errors and responsibility management.

Nitrogen: http://www.metamage.com/code/nitrogen/

The Nitrogen Manifesto, by Lisa Lippincott: http://nitric.sourceforge.net/The%20Nitrogen%20Manifesto.pdf

 

Exception-Safe Code by Jon Kalb