chg: [modules] improve error output

This commit is contained in:
terrtia 2024-03-13 10:11:03 +01:00
parent 27b2679ba6
commit eb6adc4b98
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -179,7 +179,10 @@ class AbstractModule(ABC):
trace = traceback.format_tb(err.__traceback__) trace = traceback.format_tb(err.__traceback__)
trace = ''.join(trace) trace = ''.join(trace)
self.logger.critical(f"Error in module {self.module_name}: {__name__} : {err}") self.logger.critical(f"Error in module {self.module_name}: {__name__} : {err}")
if message:
self.logger.critical(f"Module {self.module_name} input message: {message}") self.logger.critical(f"Module {self.module_name} input message: {message}")
if self.obj:
self.logger.critical(f"{self.module_name} Obj: {self.obj.get_global_id()}")
self.logger.critical(trace) self.logger.critical(trace)
if isinstance(err, ModuleQueueError): if isinstance(err, ModuleQueueError):