Catch any errors when converting x or y to an int, not just ValueErrors.