Kotlin Error Handling - Errors are Events

Опубликовано: 23 Июль 2022
на канале: Pairing with Duncan
555
26

We usually want to know when something has gone wrong. In this episode we integrate errors and analytics events, so that we automatically log failures for later analysis. I also show a nice technique for adding error information to http4k responses so that they can all be handled with a single filter.

This is Part 29 of an exploration of where a Test Driven Development implementation of the Gilded Rose stock control system might take us in Kotlin. You can see the whole series as a playlist
   • All Gilded Rose Episodes  
and the code on GitHub
https://github.com/dmcg/gilded-rose-tdd

This sub-series on error handling is also a playlist
   • Kotlin Error Handling - Exceptions, N...  

If you like this, you’ll probably like the book Java to Kotlin, A Refactoring Guidebook
http://java-to-kotlin.dev. Chapter 19 covers error handling.