Beyond Exceptions: Building Resilient Android Apps with Safety-Critical Principles
summary
Argues for a custom Result monad (sealed-error type + Result<T, E>) that gives compile-time exhaustiveness versus Kotlin Result and runCatching which can swallow CancellationException, shows an offline‑first POS running days offline across three Android apps and moves backend logic to clients, applies NASA’s Power of 10 rule recommending two assertions per function and uses require/check to fail fast in debug while converting to nonfatal reporting in release, and debugs native crashes from tombstone files surfaced in Crashlytics on Android 12+.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:09Exceptions in Java/Kotlin
- 8:46Android error classification
- 13:01Problems with exceptions
- 18:16Kotlin Result limitations
- 21:27Sealed hierarchies for errors
- 28:48Assertions for logic failures
- 35:38Summary
- 36:44Debugging native crashes
related talks
17mA closer look into error handling techniques
43mError Handling Strategies for Kotlin Programs
22mEverything you ever wanted to know about error handling in Android
42mWorking Effectively with (Android) Legacy Code
37mCoroutines! Gotta catch 'em all!
40mEffective TDD on Android with Kotlin
43mFunctional Error Handling
44mTesting Kotlin Coroutines
