๐ 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:
- Off-by-one index โ exception or a missed end element.
- Wrong loop boundary โ one extra or one missing iteration.
- Inverted boolean condition โ exactly backwards behavior.
- Wrong accumulator op โ sum where count belongs (or minus where plus).
- Unreset state โ value from a previous run leaks into the next (streak counters, running totals).
- String index error โ charAt/substring past the ends.
- ArrayList mutation-scan โ forward removal skips the shifted element.
- Object state error โ a field mutated by the wrong method or read before assignment.
- Constructor error โ shadowed parameter, forgotten field.
- Inheritance error โ override missing
super.or the override never called. - Polymorphism error โ reference type read where the object type governs.
- Recursion error โ missing/wrong base case or no progress.
- 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?).