""" Exceptions throwable by the ETL Server """ # Copyright 2005, 2006 EIAO Consoritum # This program is distributed under the terms of the GNU General # Public License. # # This file is part of the European Internet Accessibility Observatory # (EIAO) # # EIAO is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # EIAO is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with EIAO; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301 USA __author__ = "Morten Goodwin Olsen" __maintainer__ = "Nils Ulltveit-Moe" __version__ = "$Id$" class ETLServerError(Exception): """Basic class for reporting RDFGeneratorError """ class TooManySitesError(ETLServerError): """Excaption when more sites have been pushed on the stack than is reported. """ def __init__(self, testrunnr, modelnr, numberofsites,correctsites,failedsites): """ Throws a TooManySitesError exception Keyword arguments: testrunnr -- Current TestRun Nr modelnr -- Current Model Nr numberofsites -- Total number of sites reported correctsites -- Total number of correct sites reported failedsites -- Total number of failed sites reported """ msg = 'Testrun %s, model %s has %s number of sites reported. This does not match the number of correct and failed sites reported (%s+%s=%s!=%s).' %(str(testrunnr), str(modelnr),str(numberofsites),str(correctsites),str(failedsites),str(correctsites+failedsites),str(numberofsites)) ETLServerError.__init__(self,msg)