Skip to content

errors.py

Defines errors for the pipeline to return.

MaxPipelineRunsError

Bases: PipelineError

Error for reporting the number of concurrent jobs is maxed out.

Source code in vast_pipeline/pipeline/errors.py
35
36
37
38
39
40
41
42
43
44
45
46
47
class MaxPipelineRunsError(PipelineError):
    """
    Error for reporting the number of concurrent jobs is maxed out.
    """

    def __str__(self) -> str:
        """
        Returns the string representation.

        Returns:
            The string representation of the error.
        """
        return 'Max pipeline concurrent runs reached!'

__str__(self)

Returns the string representation.

Returns:

Type Description
str

The string representation of the error.

Source code in vast_pipeline/pipeline/errors.py
40
41
42
43
44
45
46
47
def __str__(self) -> str:
    """
    Returns the string representation.

    Returns:
        The string representation of the error.
    """
    return 'Max pipeline concurrent runs reached!'

PipelineConfigError

Bases: PipelineError

Error for issue in the pipeline configuration

Source code in vast_pipeline/pipeline/errors.py
50
51
52
53
54
55
56
57
58
59
60
61
class PipelineConfigError(PipelineError):
    """
    Error for issue in the pipeline configuration
    """
    def __init__(self, msg=None):
        """
        Initialises the config error.

        Args:
            msg: The error message returned by the pipeline.
        """
        super(PipelineConfigError, self).__init__(msg)

__init__(self, msg=None)

Initialises the config error.

Parameters:

Name Type Description Default
msg

The error message returned by the pipeline.

None
Source code in vast_pipeline/pipeline/errors.py
54
55
56
57
58
59
60
61
def __init__(self, msg=None):
    """
    Initialises the config error.

    Args:
        msg: The error message returned by the pipeline.
    """
    super(PipelineConfigError, self).__init__(msg)

PipelineError

Bases: Exception

Generic pipeline error

Attributes:

Name Type Description
msg str

The full error string to return.

Source code in vast_pipeline/pipeline/errors.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class PipelineError(Exception):
    """
    Generic pipeline error

    Attributes:
        msg (str): The full error string to return.
    """

    def __init__(self, msg: str=None) -> None:
        """
        Initialises the error.

        Args:
            msg: The error message returned by the pipeline.
        """
        self.msg = (
            'Pipeline error: {0}.'.format(msg) if msg else
            'Undefined Pipeline error.'
        )

    def __str__(self) -> str:
        """
        Returns the string representation.

        Returns:
            The string representation of the error.
        """
        return self.msg

__init__(self, msg=None)

Initialises the error.

Parameters:

Name Type Description Default
msg str

The error message returned by the pipeline.

None
Source code in vast_pipeline/pipeline/errors.py
13
14
15
16
17
18
19
20
21
22
23
def __init__(self, msg: str=None) -> None:
    """
    Initialises the error.

    Args:
        msg: The error message returned by the pipeline.
    """
    self.msg = (
        'Pipeline error: {0}.'.format(msg) if msg else
        'Undefined Pipeline error.'
    )

__str__(self)

Returns the string representation.

Returns:

Type Description
str

The string representation of the error.

Source code in vast_pipeline/pipeline/errors.py
25
26
27
28
29
30
31
32
def __str__(self) -> str:
    """
    Returns the string representation.

    Returns:
        The string representation of the error.
    """
    return self.msg

PipelineInitError

Bases: PipelineError

Error for issue in the pipeline initialisation

Source code in vast_pipeline/pipeline/errors.py
64
65
66
67
68
69
70
71
72
73
74
75
class PipelineInitError(PipelineError):
    """
    Error for issue in the pipeline initialisation
    """
    def __init__(self, msg=None):
        """
        Initialises the init error.

        Args:
            msg: The error message returned by the pipeline.
        """
        super(PipelineInitError, self).__init__(msg)

__init__(self, msg=None)

Initialises the init error.

Parameters:

Name Type Description Default
msg

The error message returned by the pipeline.

None
Source code in vast_pipeline/pipeline/errors.py
68
69
70
71
72
73
74
75
def __init__(self, msg=None):
    """
    Initialises the init error.

    Args:
        msg: The error message returned by the pipeline.
    """
    super(PipelineInitError, self).__init__(msg)

Last update: March 2, 2022
Created: March 2, 2022