1 # -*- coding: utf-8 -*-
2 '''exceptions: define exceptions'''
4 class NewslashIndexError(Exception):
9 class ConfigFileError(NewslashIndexError):
10 SECTION_NOT_FOUND = "Section not found"
11 PARAMETER_NOT_FOUND = "Parameter not found"
12 def __init__(self, reason, section=""):
13 self.message = "Config Error - {}: {}".format(reason, section)
16 class DocumentMakingError(NewslashIndexError):
17 def __init__(self, message="error while document making"):
18 self.message = message
21 class DatabaseError(NewslashIndexError):
22 def __init__(self, message="datagbase error"):
23 self.message = message