1 // Copyright (c) 1996 James Clark
2 // See the file COPYING for copying permission.
8 #include "ErrorCountEventHandler.h"
11 namespace SP_NAMESPACE {
14 ErrorCountEventHandler::ErrorCountEventHandler(unsigned errorLimit)
15 : errorCount_(0), maxErrors_(errorLimit), cancel_(0)
19 void ErrorCountEventHandler::message(MessageEvent *event)
21 noteMessage(event->message());
25 void ErrorCountEventHandler::noteMessage(const Message &message)
27 if (message.isError() && ++errorCount_ == maxErrors_)