Exit from compile if anything goes wrong.