Instead of letting a NumberFormatException be thrown here, catch that in try block here and throw a IllegalDataException instead, as we have some special handling around these type of runtime exceptions.