Merge "Ensure that correct exception is raised"

This commit is contained in:
Jenkins 2016-12-04 10:07:03 +00:00 committed by Gerrit Code Review
commit 8f238e0b71
1 changed files with 2 additions and 2 deletions

View File

@ -157,12 +157,12 @@ class NsxLibApiBase(object):
err_msg = (_("Could not find %(resource)s %(name)s") %
{'name': name_or_id, 'resource': resource})
# TODO(aaron): improve exception handling...
raise exceptions.ManagerError(details=err_msg)
raise nsxlib_exceptions.ManagerError(details=err_msg)
elif len(matched_results) > 1:
err_msg = (_("Found multiple %(resource)s named %(name)s") %
{'name': name_or_id, 'resource': resource})
# TODO(aaron): improve exception handling...
raise exceptions.ManagerError(details=err_msg)
raise nsxlib_exceptions.ManagerError(details=err_msg)
return matched_results[0].get('id')