cc8da9392e
This makes messages look nicer in logs.
18 lines
495 B
Python
18 lines
495 B
Python
class UserInputError(Exception):
|
|
def __init__(self, strerror, user_input):
|
|
super().__init__(strerror, user_input)
|
|
self.strerror = strerror
|
|
self.user_input = user_input
|
|
|
|
def __str__(self):
|
|
return "{}: {}".format(self.strerror, self.user_input)
|
|
|
|
|
|
class UserInputConfigurationError(UserInputError):
|
|
pass
|
|
|
|
|
|
class UserInputFileError(UserInputError):
|
|
def __init__(self, strerror, path):
|
|
super().__init__(strerror, path)
|
|
self.path = path
|