2017-10-22 17:38:53 +00:00
|
|
|
class UserInputError(Exception):
|
|
|
|
def __init__(self, strerror, user_input):
|
|
|
|
super().__init__(strerror, user_input)
|
|
|
|
self.strerror = strerror
|
|
|
|
self.user_input = user_input
|
|
|
|
|
2017-10-26 16:04:44 +00:00
|
|
|
def __str__(self):
|
|
|
|
return "{}: {}".format(self.strerror, self.user_input)
|
|
|
|
|
2017-10-22 17:38:53 +00:00
|
|
|
|
|
|
|
class UserInputConfigurationError(UserInputError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class UserInputFileError(UserInputError):
|
|
|
|
def __init__(self, strerror, path):
|
|
|
|
super().__init__(strerror, path)
|
|
|
|
self.path = path
|