Doug Wilson
Nov 6, 2023

--

More functional mumbo jumbo.

Everybody talks about disrupting the normal execution flow. Y'know what really disrupts normal execution flow? Runtime exceptions!

These need to be handled in a structured way, not just be console logging them, which is what almost every trivialized code example shows.

Almost no one talks about implementing retries, rollbacks (including distributed transaction rollbacks), etc, i.e. effective, real-world measures, in the context of a catch block.

Yes, dealing with runtime exceptions is difficult and can be messy. But things go wrong all the time. Ensuring that we know what happened and what caused or allowed it and ensuring that we leave the system in a known, safe state is what catching and handling runtime exceptions is all about.

--

--

Doug Wilson
Doug Wilson

Written by Doug Wilson

Doug Wilson is an experienced software application architect, music lover, problem solver, former film/video editor, philologist, and father of four.

No responses yet