Fix syntax error with missing 'raise'