Writing robust code

Error handling is a fundamental part of any API. The error handling strategy of a code base determines how costly errors are at run time, how much code is spent on error handling, whether const can be used for classes, and whether functions are composable. This talk will cover all popular error handling and reporting strategies, including global variables (errno), return codes, exceptions, and assertions. It will also cover some common perceptions and attempt to either refute or back them up with hard data, primarily the question of the performance impact of each strategy.

Possibly more important, however, is allowing erroneous code to be caught prior to deployment. This means making effective use of static_assert, strong type checks, and compiler warnings in addition to styles of coding that make errors more obvious in code review.

This talk will only briefly cover strategies such as test-driven development, and only in the context of other strategies for robustness. There are many more thorough reviews available than could be fit in the remaining time.

Speaker: David Stone

Slides: Writing robust code


Go back