docker-tidy/dockertidy/exception.py

17 lines
423 B
Python
Raw Normal View History

2020-03-01 17:42:29 +00:00
#!/usr/bin/env python3
"""Custom exceptions."""
class TidyError(Exception):
"""Generic exception class for docker-tidy."""
def __init__(self, msg, original_exception=""):
2020-04-11 12:50:11 +00:00
super(TidyError, self).__init__("{msg}\n{org}".format(msg=msg, org=original_exception))
2020-03-01 17:42:29 +00:00
self.original_exception = original_exception
class ConfigError(TidyError):
"""Errors related to config file handling."""
pass