PYTHON Need to print error message for non-integers as well as integers
<p>When I run the following code in python after entering an integer (eg. 4, 5, 6, 100, etc.), it prints the <code>"ERROR: the choice can only be 1, 2, or 3." message.</code></p>

<p>However, if I enter a letter like 'xyz' I get the following:</p>

<pre><code>builtins.ValueError: invalid literal for int() with base 10: 'x'
</code></pre>

<p>What I need is to get the error message to display whenever ANYTHING but a 1, 2, or 3 is entered and I can't figure out how to do that. Thanks.</p>

<pre><code>print('What is your choice? Enter 1 for rock, 2 for paper, or 3 for scissors: ')
choice2 = int(input())
while choice2 != 1 and choice2 != 2 and choice2 != 3:
   print("ERROR: the choice can only be 1, 2, or 3.")
   choice2 = int(input("Please enter a correct choice: "))
</code></pre>