From fec214320363b3bca58ded17ea4250f2cdae8425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Fri, 13 Nov 2015 12:18:02 +0100 Subject: [PATCH] SummaryPage-Module: Create Exception-Classes --- summarypage.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/summarypage.py b/summarypage.py index c0f61ff..0470f35 100644 --- a/summarypage.py +++ b/summarypage.py @@ -31,7 +31,7 @@ from datetime import datetime, timedelta import pywikibot import mwparserfromhell as mwparser -from countrylist import CountryList +from countrylist import CountryList, CountryListError class SummaryPage(): """ @@ -165,7 +165,7 @@ class SummaryPageEntry(): else: self.countrylist_revid = 0 - def update_params( self ): + def update_params( self ): """ Updates values of Parameters of template """ @@ -325,3 +325,22 @@ class SummaryPageEntryTemplate(): # If not returned True until now return False + + +class SummaryPageError( Exception ): + """ + Handles errors occuring in class SummaryPage + """ + pass + +class SummaryPageEntryError( SummaryPageError ): + """ + Handles errors occuring in class SummaryPageEntry + """ + pass + +class SummaryPageEntryTemplateError( SummaryPageError ): + """ + Handles errors occuring in class SummaryPageEntryTemplate + """ + pass