You might want to catch NumberFormatExceptions here and transform them into suitable exceptions.