Coverage for python/lsst/pipe/base/pipeline_graph/_exceptions.py: 100%
12 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-08-23 10:30 +0000
« prev ^ index » next coverage.py v7.3.0, created at 2023-08-23 10:30 +0000
1# This file is part of pipe_base.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (http://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21from __future__ import annotations
23__all__ = (
24 "ConnectionTypeConsistencyError",
25 "DuplicateOutputError",
26 "IncompatibleDatasetTypeError",
27 "PipelineGraphExceptionSafetyError",
28 "PipelineDataCycleError",
29 "PipelineGraphError",
30 "PipelineGraphReadError",
31 "EdgesChangedError",
32 "UnresolvedGraphError",
33 "TaskNotImportedError",
34)
37class PipelineGraphError(RuntimeError):
38 """Base exception raised when there is a problem constructing or resolving
39 a pipeline graph.
40 """
43class DuplicateOutputError(PipelineGraphError):
44 """Exception raised when multiple tasks in one pipeline produce the same
45 output dataset type.
46 """
49class PipelineDataCycleError(PipelineGraphError):
50 """Exception raised when a pipeline graph contains a cycle."""
53class ConnectionTypeConsistencyError(PipelineGraphError):
54 """Exception raised when the tasks in a pipeline graph use different (and
55 incompatible) connection types for the same dataset type.
56 """
59class IncompatibleDatasetTypeError(PipelineGraphError):
60 """Exception raised when the tasks in a pipeline graph define dataset types
61 with the same name in incompatible ways, or when these are incompatible
62 with the data repository definition.
63 """
66class UnresolvedGraphError(PipelineGraphError):
67 """Exception raised when an operation requires dimensions or dataset types
68 to have been resolved, but they have not been.
69 """
72class PipelineGraphReadError(PipelineGraphError, IOError):
73 """Exception raised when a serialized PipelineGraph cannot be read."""
76class TaskNotImportedError(PipelineGraphError):
77 """Exception raised when accessing an attribute of a graph or graph node
78 that is not available unless the task class has been imported and
79 configured.
80 """
83class EdgesChangedError(PipelineGraphError):
84 """Exception raised when the edges in one version of a pipeline graph
85 are not consistent with those in another, but they were expected to be.
86 """
89class PipelineGraphExceptionSafetyError(PipelineGraphError):
90 """Exception raised when a PipelineGraph method could not provide strong
91 exception safety, and the graph may have been left in an inconsistent
92 state.
94 The originating exception is always chained when this exception is raised.
95 """