2019-10-08 09:30:31 +00:00
|
|
|
#!/usr/bin/env python3
|
2023-01-21 21:17:54 +00:00
|
|
|
"""Doctor exception module."""
|
2019-10-08 09:30:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DoctorError(Exception):
|
2023-01-21 21:17:54 +00:00
|
|
|
"""Define generic exception."""
|
2019-10-08 09:30:31 +00:00
|
|
|
|
|
|
|
def __init__(self, msg, original_exception=""):
|
2023-01-20 10:56:12 +00:00
|
|
|
super().__init__(f"{msg}\n{original_exception}")
|
2019-10-08 09:30:31 +00:00
|
|
|
self.original_exception = original_exception
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigError(DoctorError):
|
|
|
|
"""Errors related to config file handling."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InputError(DoctorError):
|
|
|
|
"""Errors related to config file handling."""
|
|
|
|
|
|
|
|
pass
|