Cleanup in thrown exceptions.