Stop code if there is an error.