Skip to main content

Checkpoint: The Robust Importer

beginner40 min readLesson 51 of 180

Blank guards, field counts, defensive parses, range checks, 1-based messages - one pipeline that never stops early.

The robust importer - everything in this module composing.

Inside the provided Solution skeleton, implement importRows(lines, errors, rows) exactly as the checkpoint prompt specifies: blank-line guard, field-count check, defensive age parse, range check, empty-name check, 1-based error messages, collect-and-continue, return the imported count.

Run the tests. All three blocks must pass - then read the wrong solution shown in the lesson notes: it parses without a guard, so one Binh,abc row crashes the entire import with an uncaught NumberFormatException. Your try/catch is the difference between an importer and a crash.