diff --git a/nvchecker/core.py b/nvchecker/core.py index bb061a1..135c72e 100644 --- a/nvchecker/core.py +++ b/nvchecker/core.py @@ -170,7 +170,9 @@ class Source: for fu in asyncio.as_completed(futures): name, result = await fu if isinstance(result, Exception): - logger.error('unexpected error happened', name=name, exc_info=result) + logger.error('unexpected error happened', + name=name, exc_info=result) + self.on_exception(name, result) elif result is not None: self.print_version_update(name, result) @@ -191,6 +193,9 @@ class Source: def on_update(self, name, version, oldver): pass + def on_exception(self, name, exc): + pass + def __repr__(self): return '' % self.name