Replace exceptions by simple returns