~/talk

Failing Successfully: Reporting and Handling Errors

Talkat CppCon 2021 · on Monday, 2021-10-25· at 14:00· online· [security]
links:none on file
slides:none on file

Argues for precise error contracts: prefer fail fast and fail often, keep low-level APIs returning error codes and hand up rich context so higher layers can decide whether to treat a condition as fatal, and use exceptions only where the application-level semantics make failures exceptional. Shows concrete failures of a_to_i/strtol/from_chars, demos std::error_code/system_error, a threadsafe thread pool that fans exceptions back to main, and a processor manager that treats EOF as successful shutdown when appropriate.

AI-written summary · about

  1. 0:00Intro
  2. 1:58Alternatives
  3. 9:08Real 8I
  4. 14:20Broad Classes of Failure
  5. 17:14Error Enumeration
  6. 19:54SystemError
  7. 20:53Exceptions
  8. 22:45What if
  9. 23:55Writing a fixed message reader
  10. 26:52Multithreading
  11. 27:48Thread Pool
  12. 31:53Network Server
  13. 32:40Who is the error
  14. 33:36Success or failure
  15. 38:36Warnings Logging
  16. 40:48Takeaways
  17. 41:25Questions
  18. 42:26The lowest hanging fruit
  19. 44:08Out parameter
  20. 45:43Capturing context
~/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.