summaryrefslogtreecommitdiffstats
path: root/python/knot_resolver_manager/exceptions.py
blob: 5b05d98ebace7908692600e1e6fd81b68a382689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from typing import List


class CancelStartupExecInsteadException(Exception):
    """
    Exception used for terminating system startup and instead
    causing an exec of something else. Could be used by subprocess
    controllers such as supervisord to allow them to run as top-level
    process in a process tree.
    """

    def __init__(self, exec_args: List[str], *args: object) -> None:
        self.exec_args = exec_args
        super().__init__(*args)


class KresManagerException(Exception):
    """
    Base class for all custom exceptions we use in our code
    """


class SubprocessControllerException(KresManagerException):
    pass


class SubprocessControllerTimeoutException(KresManagerException):
    pass