- printfv("Testing notice %d...", $notice->id);
- $result = $filter->test($notice);
- Spam_score::save($notice, $result);
- printfv("%s\n", ($result->isSpam) ? "SPAM" : "HAM");
+ try {
+ printfv("Testing notice %d...", $notice->id);
+ $result = $filter->test($notice);
+ Spam_score::save($notice, $result);
+ printfv("%s\n", ($result->isSpam) ? "SPAM" : "HAM");
+ } catch (Exception $e) {
+ printfnq("ERROR testing notice %d\n: %s", $notice->id, $e->getMessage());
+ }