import pathlib from .file import file from .command import command class abstract(TypeError): def __init__(self) -> None: super().__init__("This is abstract function.") class not_exists(RuntimeError): def __init__(self, target: pathlib.Path) -> None: super().__init__("File \"" + str(target) + "\" not exists.") class already_packed(RuntimeError): def __init__(self, target: file) -> None: super().__init__( "File for \"" + target.path_name + "\" already packed." ) class broken_package(RuntimeError): def __init__(self, error: Exception) -> None: super().__init__("Can not unpack broken package.\n" + str(error)) class not_readable(Exception): def __init__(self, target: pathlib.Path, error: Exception) -> None: super().__init__( "File \"" + str(target) + "\" can not being read. " \ + "Because of \"" + str(error) + "\" exception." )