Coverage for src / mafw / mafw_errors.py: 100%
31 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-09 09:08 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-09 09:08 +0000
1# Copyright 2025 European Union
2# Author: Bulgheroni Antonio (antonio.bulgheroni@ec.europa.eu)
3# SPDX-License-Identifier: EUPL-1.2
4"""
5Module defines MAFw exceptions
6"""
9class MAFwException(Exception):
10 """Base class for MAFwException"""
12 pass
15class ProcessorParameterError(MAFwException):
16 """Error with a processor parameter"""
18 pass
21class InvalidConfigurationError(MAFwException):
22 """Error with the configuration of a processor"""
24 pass
27class MissingOverloadedMethod(UserWarning):
28 """
29 Warning issued when the user did not overload a required method.
31 It is a warning and not an error because the execution framework might still work, but the results might be
32 different from what is expected.
33 """
35 pass
38class MissingSuperCall(UserWarning):
39 """
40 Warning issued when the user did not invoke the super method for some specific processor methods.
42 Those methods (like :meth:`~mafw.processor.Processor.start` and :meth:`~mafw.processor.Processor.finish`) have not
43 empty implementation also in the base class, meaning that if the user forgets to call *super* in their overloads,
44 then the basic implementation will be gone.
46 It is a warning and not an error because the execution framework might sill work, but the results might be
47 different from what is expected.
48 """
50 pass
53class AbortProcessorException(MAFwException):
54 """Exception raised during the execution of a processor requiring immediate exit."""
56 pass
59class RunnerNotInitialized(MAFwException):
60 """Exception raised when attempting to run a not initialized Runner."""
62 pass
65class InvalidSteeringFile(MAFwException):
66 """Exception raised when validating an invalid steering file"""
68 pass
71class UnknownProcessor(MAFwException):
72 """Exception raised when an attempt is made to create an unknown processor"""
74 pass
77class UnknownProcessorGroup(MAFwException):
78 """Exception raised when an attempt is made to create an unknown processor group"""
80 pass
83class UnknownDBEngine(MAFwException):
84 """Exception raised when the user provided an unknown db engine"""
86 pass
89class MissingDatabase(MAFwException):
90 """Exception raised when a processor requiring a database connection is being operated without a database"""
93class MissingAttribute(MAFwException):
94 """Exception raised when an attempt is made to execute a statement without a required parameter/attributes"""
97class ParserConfigurationError(MAFwException):
98 """Exception raised when an error occurred during the configuration of a filename parser"""
101class ParsingError(MAFwException):
102 """Exception raised when a regular expression parsing failed"""
105class MissingSQLStatement(MAFwException):
106 """Exception raised when a Trigger is created without any SQL statements."""
109class UnsupportedDatabaseError(Exception):
110 """Error raised when a feature is not supported by the database."""
113class ModelError(MAFwException):
114 """Exception raised when an error in a DB Model class occurs"""
117class MissingOptionalDependency(UserWarning):
118 """UserWarning raised when an optional dependency is required"""
121class PlotterMixinNotInitialized(MAFwException):
122 """Exception raised when a plotter mixin has not properly initialized"""