Fix syntax error in exception handler