~/talk

You’re Doing Exceptions Wrong

Talkat NDC London 2025 · 2025-01-27..01-31· [software-architecture]
links:none on file
slides:none on file

Four practical categories determine how to handle errors: fatal vs boneheaded vs vexing vs exogenous — treat out-of-memory and stack overflow as process-killers, prevent null reference/index-out-of-range bugs instead of catching them, convert APIs that throw (use TryParse rather than int.Parse) or catch the exception right at the source (Cosmos DB read throws a 404 for missing docs), and never swallow external IO failures (don’t return zero on error). Use retries for specific codes like 503 with libraries such as Polly, and preserve stack trace with throw;.

AI-written summary · about

  1. 0:00Introduction
  2. 2:19Exceptions are good usually
  3. 8:20Fatal exceptions and crashes
  4. 11:06Boneheaded exceptions
  5. 19:12Helpful exception messages
  6. 23:45Avoid harmful error messages
  7. 29:41Debug assertions vs boneheaded
  8. 33:33Vexing exceptions and API pitfalls
  9. 37:48Exogenous exceptions
  10. 39:55Never hide exceptions
  11. 44:09Where to handle exceptions
  12. 48:09Retry logic for exceptions
  13. 51:39Preserve stack traces with finally
  14. 54:31Exception categories recap
  15. 56:57Q&A
~/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.