mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-05 04:40:42 +00:00
27 lines
553 B
Python
27 lines
553 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 TemplateError(DoctorError):
|
|
"""Errors related to template file handling."""
|