Change in vdsm[master]: utils: Add unhandled exceptions logging decorator
danken at redhat.com
danken at redhat.com
Wed Nov 27 12:32:44 UTC 2013
Dan Kenigsberg has posted comments on this change.
Change subject: utils: Add unhandled exceptions logging decorator
......................................................................
Patch Set 1: -Code-Review
(1 comment)
....................................................
File lib/vdsm/utils.py
Line 592: try:
Line 593: return f(*a, **kw)
Line 594: except Exception:
Line 595: log = logging.getLogger(on)
Line 596: log.exception(msg)
However, the mundane name "logged" may suggest that the function should be used in anything but Thread.run. future developers may thing that it's a good idea to hide the fact that it swallows an exception.
How about adding a "raise" here, to avoid that?
Line 597: return wrapper
Line 598: return decorator
Line 599:
Line 600:
--
To view, visit http://gerrit.ovirt.org/21778
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I39265bac4f26fefa365bad080dafb6106145f846
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list