summaryrefslogtreecommitdiffstats
path: root/nova/test.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-12-18 10:00:30 -0500
committerDan Prince <dprince@redhat.com>2012-12-18 14:27:19 -0500
commitf8d2f8689a31a7e81cdf06a4df45408a1a056595 (patch)
tree96e5a9c52575da550af43d8887a5e154301d7bf1 /nova/test.py
parent65d9f80b5bfe9e94323f31f2d109670798774466 (diff)
downloadnova-f8d2f8689a31a7e81cdf06a4df45408a1a056595.tar.gz
nova-f8d2f8689a31a7e81cdf06a4df45408a1a056595.tar.xz
nova-f8d2f8689a31a7e81cdf06a4df45408a1a056595.zip
Raise old exception instance instead of new one.
Updates the Nova conductor API's ExceptionHelper class so that it raises the previous exception instance instead of constructing a new exception class based on the old one's message. The motivation for this change is to enable testing of NovaException message formatting. Previously this function would always construct a new NovaException which had the incorrect (none) kwargs specified to properly format the message. The exception would get thrown... but it would cause extra LOG.error messages to appear in the log file due to the formatting errors. This commit works around the issue by raising the previous Exception directly. From 'pydoc raise': If the first object is an instance, the type of the exception is the class of the instance, the instance itself is the value, and the second object must be ``None``. Change-Id: I1dddc9e1e7e3d5f970baa9a34b709c943820295e
Diffstat (limited to 'nova/test.py')
0 files changed, 0 insertions, 0 deletions