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