cc-4105: Added exceptions classes. Created config wrapper class
This commit is contained in:
parent
45385dffce
commit
76cac68fe7
2 changed files with 46 additions and 3 deletions
|
@ -1,7 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
class BadSongFile(Exception):
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
def __init__(self, path): self.path = path
|
||||
def __str__(self): return "Can't read %s" % self.path
|
||||
|
||||
class NoConfigFile(Exception):
|
||||
def __init__(self, path): self.path = path
|
||||
def __str__(self):
|
||||
return "Can't read %s" % self.path
|
||||
return "Path '%s' for config file does not exit" % self.path
|
||||
|
||||
class ConfigAccessViolation(Exception):
|
||||
def __init__(self,key): self.key = key
|
||||
def __str__(self): return "You must not access key '%s' directly" % self.key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue