Skip to Content
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
book

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices

by Herb Sutter, Andrei Alexandrescu
October 2004
Intermediate to advanced
240 pages
6h 22m
English
Addison-Wesley Professional
Content preview from C++ Coding Standards: 101 Rules, Guidelines, and Best Practices

69. Establish a rational error handling policy, and follow it strictly

Summary

Consciously specify, and conscientiously apply, what so many projects leave to adhoc (mis)judgment: Develop a practical, consistent, and rational error handling policy early in design, and then stick to it. Ensure that it includes:

Identification: What conditions are errors.

Severity: How important or urgent each error is.

Detection: Which code is responsible for detecting the error.

Propagation: What mechanisms are used to report and propagate error notifications in each module.

Handling: What code is responsible for doing something about the error.

Reporting: How the error will be logged or users notified.

Change error handling mechanisms only on module ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ Core Guidelines Explained: Best Practices for Modern C++

C++ Core Guidelines Explained: Best Practices for Modern C++

Rainer Grimm
C++ Templates: The Complete Guide, 2nd Edition

C++ Templates: The Complete Guide, 2nd Edition

David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor

Publisher Resources

ISBN: 0321113586Purchase book