Be more robust about exceptions.