© Karl Beecher 2018
Karl BeecherBad Programming Practices 101https://doi.org/10.1007/978-1-4842-3411-2_7

7. Error Handling

Karl Beecher1 
(1)
Berlin, Germany
 

Objectives

In this chapter, you’ll learn:
  • Typical error-handling techniques and how to ignore them

  • How to suppress errors

  • How to dodge responsibility for handling errors altogether

  • How to make error-handling as messy an affair as possible

Prerequisites

Before reading this chapter, it will help if you’re familiar with:
  • Assertions

  • Exceptions, including some of the most common exception types in Java (e.g., NullPointerException, IOException)

  • Stack traces

Introduction

Any man can make mistakes, but only a fool persists in his error.

—Cicero

As if you couldn’t guess, making a mess of error-handling is a great ...

Get Bad Programming Practices 101: Become a Better Coder by Learning How (Not) to Program now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.