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

  • Subsystem Boundaries

    Managing exceptions at subsystem boundaries is crucial for maintaining code clarity and reducing clutter. emphasizes the importance of handling exceptions at these boundaries to prevent code from becoming unreadable due to excessive catch blocks 1. He advises that errors, which are expected problems, should be handled locally when possible, such as through connection failover or caching data if a network is down 1. adds that distinguishing between errors and exceptions is vital, as it impacts the design and architecture of software systems 2.

       

    Simplified Processes

    Simplifying exception processes involves maintaining simplicity in exception class usage and avoiding unnecessary complications. Arno warns against creating complex inheritance hierarchies for exceptions, as they often do not pay off in terms of handling 3. He suggests using self-documenting exceptions and keeping exception and error classes simple, only defining them when necessary for control flow 3. highlights the importance of rollback semantics, which ensure that an object's state remains consistent even if a call fails, thus simplifying error handling 4.

Related Episodes