try changing your catch parameter to (NumberFormatException e) and see what happens