16. Exception Handling

Don’t Panic!

The Hitchhiker’s Guide to the Galaxy

Aims for exception handling — assumptions about exception handling — syntax — grouping of exceptions — resource management — errors in constructors — resumption vs. termination semantics — asynchronous events — multi-level exception propagation — static checking — implementation issues — invariants.

16.1 Introduction

In the original design of C++, exceptions were considered, but postponed because there wasn’t time to do a thorough job of exploring the design and implementation issues and because of fear of the complexity they might add to an implementation (§3.15). In particular, it was understood that a poor design could cause run-time overhead and a significant increase ...

Get The Design and Evolution of C++, First Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.