2 Exception Classes for the xdg package
7 class Error(Exception):
8 def __init__(self, msg):
10 Exception.__init__(self, msg)
14 class ValidationError(Error):
15 def __init__(self, msg, file):
18 Error.__init__(self, "ValidationError in file '%s': %s " % (file, msg))
20 class ParsingError(Error):
21 def __init__(self, msg, file):
24 Error.__init__(self, "ParsingError in file '%s', %s" % (file, msg))
26 class NoKeyError(Error):
27 def __init__(self, key, group, file):
28 Error.__init__(self, "No key '%s' in group %s of file %s" % (key, group, file))
32 class DuplicateKeyError(Error):
33 def __init__(self, key, group, file):
34 Error.__init__(self, "Duplicate key '%s' in group %s of file %s" % (key, group, file))
38 class NoGroupError(Error):
39 def __init__(self, group, file):
40 Error.__init__(self, "No group: %s in file %s" % (group, file))
43 class DuplicateGroupError(Error):
44 def __init__(self, group, file):
45 Error.__init__(self, "Duplicate group: %s in file %s" % (group, file))
48 class NoThemeError(Error):
49 def __init__(self, theme):
50 Error.__init__(self, "No such icon-theme: %s" % theme)