handle format string exceptions separately

This commit is contained in:
Mike Fährmann
2017-08-11 21:48:37 +02:00
parent 3c9f190757
commit ae2d61e5b3
3 changed files with 23 additions and 5 deletions

View File

@@ -54,6 +54,10 @@ class Job():
log.error("The %s at '%s' does not exist", res, self.url)
except exception.HttpError as exc:
log.error("HTTP request failed:\n%s", exc)
except exception.FormatError as exc:
err, obj = exc.args
log.error("Applying %s format string failed:\n%s: %s",
obj, err.__class__.__name__, err)
except exception.StopExtraction:
pass
except OSError as exc: