Skip to content

Commit

Permalink
windows: set exceptions on pending futures
Browse files Browse the repository at this point in the history
  • Loading branch information
hartytp committed May 10, 2019
1 parent 8a296f9 commit f43a479
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quamash/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def _process_events(self, events):
try:
self._logger.debug('Invoking event callback {}'.format(callback))
value = callback(transferred, key, ov)
except OSError:
except OSError as e:
self._logger.warning('Event callback failed', exc_info=sys.exc_info())
if not f.done():
f.set_exception(e)
else:
f.set_result(value)

Expand Down

0 comments on commit f43a479

Please sign in to comment.