Source code for mafw.mafw_errors

#  Copyright 2025 European Union
#  Author: Bulgheroni Antonio (antonio.bulgheroni@ec.europa.eu)
#  SPDX-License-Identifier: EUPL-1.2
"""
Module defines MAFw exceptions
"""


[docs] class MAFwException(Exception): """Base class for MAFwException""" pass
[docs] class ProcessorParameterError(MAFwException): """Error with a processor parameter""" pass
[docs] class InvalidConfigurationError(MAFwException): """Error with the configuration of a processor""" pass
[docs] class MissingOverloadedMethod(UserWarning): """ Warning issued when the user did not overload a required method. It is a warning and not an error because the execution framework might still work, but the results might be different from what is expected. """ pass
[docs] class MissingSuperCall(UserWarning): """ Warning issued when the user did not invoke the super method for some specific processor methods. Those methods (like :meth:`~mafw.processor.Processor.start` and :meth:`~mafw.processor.Processor.finish`) have not empty implementation also in the base class, meaning that if the user forgets to call *super* in their overloads, then the basic implementation will be gone. It is a warning and not an error because the execution framework might sill work, but the results might be different from what is expected. """ pass
[docs] class AbortProcessorException(MAFwException): """Exception raised during the execution of a processor requiring immediate exit.""" pass
[docs] class RunnerNotInitialized(MAFwException): """Exception raised when attempting to run a not initialized Runner.""" pass
[docs] class InvalidSteeringFile(MAFwException): """Exception raised when validating an invalid steering file""" pass
[docs] class UnknownProcessor(MAFwException): """Exception raised when an attempt is made to create an unknown processor""" pass
[docs] class UnknownProcessorGroup(MAFwException): """Exception raised when an attempt is made to create an unknown processor group""" pass
[docs] class UnknownDBEngine(MAFwException): """Exception raised when the user provided an unknown db engine""" pass
[docs] class MissingDatabase(MAFwException): """Exception raised when a processor requiring a database connection is being operated without a database"""
[docs] class MissingAttribute(MAFwException): """Exception raised when an attempt is made to execute a statement without a required parameter/attributes"""
[docs] class ParserConfigurationError(MAFwException): """Exception raised when an error occurred during the configuration of a filename parser"""
[docs] class ParsingError(MAFwException): """Exception raised when a regular expression parsing failed"""
[docs] class MissingSQLStatement(MAFwException): """Exception raised when a Trigger is created without any SQL statements."""
[docs] class UnsupportedDatabaseError(Exception): """Error raised when a feature is not supported by the database."""
[docs] class ModelError(MAFwException): """Exception raised when an error in a DB Model class occurs"""
[docs] class MissingOptionalDependency(UserWarning): """UserWarning raised when an optional dependency is required"""
[docs] class PlotterMixinNotInitialized(MAFwException): """Exception raised when a plotter mixin has not properly initialized"""