1 // Copyright (c) 1996 James Clark
2 // See the file COPYING for copying permission.
3 #pragma ident "%Z%%M% %I% %E% SMI"
9 #include "ErrorCountEventHandler.h"
12 namespace SP_NAMESPACE
{
15 ErrorCountEventHandler::ErrorCountEventHandler(unsigned errorLimit
)
16 : errorCount_(0), maxErrors_(errorLimit
), cancel_(0)
20 void ErrorCountEventHandler::message(MessageEvent
*event
)
22 noteMessage(event
->message());
26 void ErrorCountEventHandler::noteMessage(const Message
&message
)
28 if (message
.isError() && ++errorCount_
== maxErrors_
)