Infosys interview question

What to do if you get error in infinite loop