Published Sep 3, 2019

Episode 21: Error Handling Pt. 2

Arno Meyer and Michael Scharf delve into sophisticated error handling techniques, emphasizing simplifying exception strategies, categorizing exceptions with clarity, and ensuring robust guarantees for resource management and system stability in critical software engineering environments.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Terminology

    and emphasize the importance of precise terminology in exception handling. Arno explains that exceptions can be categorized as expected or unexpected, which helps in defining how they should be managed. Expected exceptions are those anticipated by the programmer, such as a network failure, and should be documented for the caller to handle.

    Well, actually it's good to start by defining some terminology, not that I'm into this formalistic stuff, but it's good to have clear terminology for the rest of the episode.

    ---

    Unexpected exceptions, often resulting from bugs, require a catch-all approach to prevent system failure 1.

       

    Exception Types

    The distinction between expected and unexpected exceptions is crucial for effective error handling. Expected exceptions are those that can be anticipated and documented, allowing the caller to manage them appropriately. notes that unexpected exceptions, typically arising from unforeseen bugs, should be handled in a way that minimizes system disruption.

    The main cause of unexpected exceptional conditions are, of course, bugs or just other exceptional conditions that no one thought or thinks it is necessary to handle.

    ---

    He advises against overthinking this distinction, suggesting that documentation should focus on providing clear guidance on potential errors and exceptions 1 2.

Related Episodes