The problem is what happens when you get NumberFormatexception
thrown? You print it and return nothing.
Note: You don't need to catch and throw an Exception back. Usually it is done to wrap it or print stack trace and ignore for example.
catch(RangeException e) {
throw e;
}