2013:thoughts_on_error_handling

Back to proposals-2013

Title: Thoughts on Error Handling
Proposer: frank_birbacher
Type: Tutorial
Duration: 90 minutes
Description: Focusing on C++, but touching also Java and Haskell, the talk reasons about error handling in general and in C++ in particular. Function arguments are a central topic as well as limits that we have to deal with in checking their validity. For that matter, function arguments are categorized and for each category various possible checks are discussed. This includes means outside of C++ itself such as dealing with CPU exceptions, mainly focusing on x86 processors and operating systems. A comparison to Java shows differences in the duties of the respective language runtime library. Examples shed light on the question “what is an error”, “what do we mean by ‘error’”, and “what can we do about it.” Dealing with those questions the discussion will come to the conflict of “return values vs. exceptions” and the author's personal view in this matter: exceptions are good for conditions we don't handle locally. A short excursion into Haskell territory introduces the functional concept of monads. Error handling in monads is compared to exceptions and return codes in C++. After that Abraham's exception guarantees are explained including their mechanism of safety and how they lead to canonical implementations of basic object operations like copy construction and assignment.

Roger: yes

2013/thoughts_on_error_handling.txt · Last modified: 2016/06/11 14:05 by 127.0.0.1