What to do when things go wrong in a program is always a hard problem. It’s common to blame the syntactic mechanism of a language (particularly Java’s checked exceptions) for this, but the problem is usually a conceptual one–one of design–rather than of syntax. That said, syntax can help or hinder and is less likely to hinder if understood properly.
Java provides checked exceptions which have benefits, but are widely misunderstood. Further, our industry is tending towards a more functional programming style and in that style, exceptions are only used for catastrophic situations.
This session examines the foundations of handling “when things go wrong”, builds a strong understanding of how, when, and whether, to use checked exceptions, and explains how to handle these situations in functional code such as Streams. The session also builds a practical, reusable, approach to solving the problem of integration exception-based code into newer functional code.