Source code for posty.exceptions

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from posty.config import Config


[docs] class PostyError(RuntimeError): pass
[docs] class InvalidConfig(PostyError): def __init__(self, config_obj: "Config", reason: str) -> None: msg = "Invalid config at {}. Reason: {}".format(config_obj.config_path, reason) super(self.__class__, self).__init__(msg)
[docs] class UnableToImport(PostyError): pass
[docs] class MalformedInput(PostyError): pass
[docs] class InvalidObject(PostyError): pass