mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-24 22:00:40 +00:00
29 lines
558 B
Python
29 lines
558 B
Python
#!/usr/bin/env python3
|
|
"""Doctor exception module."""
|
|
|
|
|
|
class DoctorError(Exception):
|
|
"""Define generic exception."""
|
|
|
|
def __init__(self, msg, original_exception=""):
|
|
super().__init__(f"{msg}\n{original_exception}")
|
|
self.original_exception = original_exception
|
|
|
|
|
|
class YAMLError(DoctorError):
|
|
"""Errors while reading a yaml file."""
|
|
|
|
pass
|
|
|
|
|
|
class ConfigError(DoctorError):
|
|
"""Errors related to config file handling."""
|
|
|
|
pass
|
|
|
|
|
|
class InputError(DoctorError):
|
|
"""Errors related to config file handling."""
|
|
|
|
pass
|