Add missing raise statements