update output logic on error
[ci skip]
This commit is contained in:
@@ -53,13 +53,14 @@ class Job():
|
|||||||
except exception.StopExtraction:
|
except exception.StopExtraction:
|
||||||
pass
|
pass
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
msg = "An unexpected error occurred:"
|
||||||
try:
|
try:
|
||||||
err = ": ".join(exc.args[0].reason.args[0].split(": ")[1:])
|
err = ": ".join(exc.args[0].reason.args[0].split(": ")[1:])
|
||||||
|
log.error("%s: %s - %s", msg, exc.__class__.__name__, err)
|
||||||
|
return
|
||||||
except Exception:
|
except Exception:
|
||||||
err = str(exc)
|
pass
|
||||||
log.error("An unexpected error occurred: %s - %s",
|
log.error(msg, exc_info=True)
|
||||||
exc.__class__.__name__, err)
|
|
||||||
log.debug("Traceback", exc_info=True)
|
|
||||||
|
|
||||||
def dispatch(self, msg):
|
def dispatch(self, msg):
|
||||||
"""Call the appropriate message handler"""
|
"""Call the appropriate message handler"""
|
||||||
|
|||||||
Reference in New Issue
Block a user