We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3d2af3 commit 94f584eCopy full SHA for 94f584e
src/arguments/utility.py
@@ -164,7 +164,10 @@ def get_ans(self, questions_list):
164
console.rule("[bold blue]", style="bold red", align="right")
165
# Asks the user for next question number. Makes it the active question and the loop restarts
166
while True:
167
- posx = int(input("Enter the question number you want to view (Press 0 to quit): ")) - 1
+ try:
168
+ posx = int(input("Enter the question number you want to view (Press 0 to quit): ")) - 1
169
+ except ValueError:
170
+ SearchError("You didn't enter a question number", "Enter a question number from the relevant questions list")
171
if (posx == -1):
172
return
173
elif (0<=posx<len(questions_data)):
0 commit comments