forked from p15670423/monkey
Move try catch to better handle multiple exporters
This commit is contained in:
parent
004cfa17f3
commit
bf3ad35124
|
@ -27,9 +27,9 @@ class ReportExporterManager(object):
|
||||||
self._exporters_set.add(exporter)
|
self._exporters_set.add(exporter)
|
||||||
|
|
||||||
def export(self, report):
|
def export(self, report):
|
||||||
try:
|
for exporter in self._exporters_set:
|
||||||
for exporter in self._exporters_set:
|
logger.debug("Trying to export using " + repr(exporter))
|
||||||
logger.debug("Trying to export using " + repr(exporter))
|
try:
|
||||||
exporter().handle_report(report)
|
exporter().handle_report(report)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception('Failed to export report, error: ' + e.message)
|
logger.exception('Failed to export report, error: ' + e.message)
|
||||||
|
|
Loading…
Reference in New Issue