Add a missing exception check.