~/talk

Error Handling Strategies for Kotlin Programs

Talkat KotlinConf 2019 · 2019-12-04..12-06· [kotlin, testing]
name:Nat Pryce
links:none on file
slides:none on file

Compares actual techniques and when teams switch: uses snorcher fuzzing to validate which exceptions parsers actually throw; shows converting exceptions to nullable returns for simple parsers and to a small sealed Result type for typed error handling across batch vs single-request contexts; implements an inline operator trick to early-return from lambdas and contrasts that with Arrow coroutines for cleaner monadic code; reports that moving error-prone IO to outer layers and keeping small per-context error hierarchies prevents surprising 500 storms and rollbacks.

AI-written summary · about

  1. 0:00Start
  2. 0:10Failure is not an Option Error handling strategies for Kotlin programs Nat Pryce & Duncan McGregor
  3. 2:21Error handling is hard to get right
  4. 18:41Total Functions
  5. 29:07An example Result type
  6. 30:49Convenience operations instead of when expressions
  7. 35:07Flatten nesting with inline functions & early returns
  8. 36:33How to model error reasons in the Failure case?
~/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.