Skip to content

Commit

Permalink
Merge pull request #113 from OxfordIonTrapGroup/set_exceptions
Browse files Browse the repository at this point in the history
windows: set exceptions on pending futures
  • Loading branch information
harvimt authored May 12, 2019
2 parents 8a296f9 + f43a479 commit cf7eac2
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 cf7eac2

Please sign in to comment.