Skip to main content
๐Ÿ“œ WAYPOINT LESSON

The thirteen error classes

โญโญโญ advancedโณ 10 min read๐Ÿ“ Lesson 233 of 256

Off-by-one to missing-edge: each class has a signature symptom โ€” learn the mapping, debugging becomes lookup.

The error taxonomy. Thirteen classes cover nearly every lost point. Each has a signature symptom โ€” learn the mapping and debugging becomes lookup:

  1. Off-by-one index โ€” exception or a missed end element.
  2. Wrong loop boundary โ€” one extra or one missing iteration.
  3. Inverted boolean condition โ€” exactly backwards behavior.
  4. Wrong accumulator op โ€” sum where count belongs (or minus where plus).
  5. Unreset state โ€” value from a previous run leaks into the next (streak counters, running totals).
  6. String index error โ€” charAt/substring past the ends.
  7. ArrayList mutation-scan โ€” forward removal skips the shifted element.
  8. Object state error โ€” a field mutated by the wrong method or read before assignment.
  9. Constructor error โ€” shadowed parameter, forgotten field.
  10. Inheritance error โ€” override missing super. or the override never called.
  11. Polymorphism error โ€” reference type read where the object type governs.
  12. Recursion error โ€” missing/wrong base case or no progress.
  13. Missing edge case โ€” works on the example, dies on empty / single / extremes.

Diagnosis habit: name the CLASS first, then find the line. The name tells you what to look for (an index? a flag? a base case?).