I meant: handles the various error scenarios in strtol, rather than switch to the scanf family of functions