ansible-doctor/ansibledoctor/Exception.py

23 lines
506 B
Python
Raw Normal View History

2019-10-08 09:30:31 +00:00
#!/usr/bin/env python3
2019-10-08 09:39:27 +00:00
"""Custom exceptions."""
2019-10-08 09:30:31 +00:00
class DoctorError(Exception):
"""Generic exception class for ansible-doctor."""
def __init__(self, msg, original_exception=""):
super(DoctorError, self).__init__(msg + ("\n%s" % original_exception))
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