~/talk

Error handling in C++: as easy as "use exceptions"?

Talkat NDC TechTown 2022 · 2022-08-29..09-01· [c-and-cpp]
links:none on file
slides:none on file

Compares concrete error APIs: plain return codes and enums, out-parameter patterns (like legacy C/Qt index -1), and exceptions including the four exception-safety levels and vector::at throwing; then demonstrates functional alternatives — std::expected (C++23) and boost::expected, std::optional patterns, Rust-style question-mark semantics and continuation chains — and shows experimental pattern matching demos compiled with the Circle toolchain on Godbolt. Emphasizes library-level strong/basic exception safety and trade-offs for embedded systems.

AI-written summary · about

  1. 0:00Intro
  2. 2:29Classification of issues
  3. 4:34Examples of errors and exceptional situations
  4. 6:47General approach to handling
  5. 15:40Exception safety
  6. 19:25Add context
  7. 20:38General characteristics
  8. 22:46std::optional - special case
  9. 24:58Naive implementation
  10. 29:43Functional style
  11. 32:39Pattern matching in C++
  12. 38:27Pre-conditions example (non-null pointer)
  13. 42:22Good practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.