handling user input exceptions.