~/talk

Straying From the Happy Path: Taking Control of Errors in Swift

Talkat Mobilization 8 · on Friday, 2018-10-26· [swift]
links:none on file
slides:none on file

Covers concrete Swift patterns: using Result (not yet in stdlib), AlamoFire response quirks, and XCTAssertThrowsError to verify thrown errors; shows how to replace fatalError in tests by swapping a never-returning closure so code that would crash gets tested and the project reaches 100% test coverage for those lines. Demonstrates a generic dequeue that throws ProgrammerError for UITableView cells, use of assertionFailure/precondition for debug vs release, logging helpers, and coordinating user-facing vs developer-facing errors.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Error handling problems
  3. 2:28Swift Result type
  4. 4:15Handling errors effectively
  5. 6:11Throwing errors in Swift
  6. 7:14Advanced error handling
  7. 8:41Fatal error vs testing
  8. 10:27Testing fatalError
  9. 15:07When to use fatalError
  10. 17:13Assertion failure vs fatalError
  11. 19:22Programmer error handling
  12. 21:33Testing programmer errors
  13. 22:37Logging errors effectively
  14. 24:08Typed throws in Swift
  15. 25:54Q&A: Handling errors
  16. 26:59Q&A: Error layers
  17. 29:49Q&A: Localized errors
  18. 31:16Q&A: Legacy outlet issues
  19. 33:49Improved table view handling
  20. 36:38Closing remarks
~/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.