Source code for doot.errors

 1#!/usr/bin/env python3
 2"""
 3These are the doot specific errors that can occur
 4"""
 5# Imports:
 6from __future__ import annotations
 7
 8# ##-- stdlib imports
 9import logging as logmod
10from typing import (TYPE_CHECKING, Any, Callable, ClassVar, Final, Generator,
11                    Generic, Iterable, Iterator, Mapping, Match,
12                    MutableMapping, Protocol, Sequence, Tuple, TypeAlias,
13                    TypeGuard, TypeVar, cast, final, overload,
14                    runtime_checkable)
15
16# ##-- end stdlib imports
17
18# ##-- 1st party imports
19from ._base import DootError, BackendError, FrontendError, UserError
20from .command import CommandError
21from .config import ConfigError, InvalidConfigError, MissingConfigError, VersionMismatchError
22from .control import (ActionCallError, ActionStateError,
23                      ControlError, TaskExecutionError,
24                      TrackingError, JobExpansionError)
25from .parse import ParseError
26from .plugin import AliasSearchError, PluginError, PluginLoadError
27from .state import (StateError, InjectionError, KeyAccessError,
28                    KeyExpansionError, GlobalStateMismatch,
29                    LocationError)
30from .struct import StructError, StructLoadError
31from .task import TaskError, TaskFailed, TaskTrackingError, ActionError
32
33# ##-- end 1st party imports
34
35# ##-- Generated Exports
36__all__ = ( # noqa: RUF022
37
38# -- Classes
39"EarlyExit", "Interrupt",
40
41)
42# ##-- end Generated Exports
43
[docs] 44class EarlyExit(Exception): # noqa: N818 45 """ Doot was instructed to shut down before completing the requested comand """ 46 pass
47
[docs] 48class Interrupt(ControlError): # noqa: N818 49 """ A Task was interrupted, usually to drop into a debugger """ 50 pass