[coop] Ensure GC unsafe state when throwing exception