last nit: printf() will not add a newline automatically, so you have to to printf("...%n").
Also, the message should contain details if possible.
Here it should include the illegal value: "--max-rows must be positive, got %d%n"