Exit the program if a getch() call fails.