The match function uses the field name followed by a regular expression. You're missing the regular expression from here
Try this, replace <FIELD> with your field name
| eval Err=if(match(,"\w+Exception"),1,0)
| eval ALERT=if(Err>5,"OK","GOOD")
https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/ConditionalFunctions#match.28SUBJECT.2C_.22REGEX.22.29
... View more