Open GermanHydrogen opened 8 months ago
Hmm, not a bad idea... But that moves error handling in the config file, which I find weird... The config also gets a lot more complex with this. What about adding that functionality to the ImageProcessor
base class?
This is an alternative suggestion to implementing the exception handling in the image processor base class. Doing this in the base class would introduce two new attributes
suppress_exception: bool
which toggles the exception handling anderror_header: Optional[str]
which defines the error header flat. This introduces the problem that theerror_header
attribute can be set without thesuppress_exception
attribute being true, which could lead to errors in config management. The alternative decorator approach removes the need for the first attribute. A config with this could look like thisI'm open to feedback.