The ValueError exception is now caught in the inner try block.