Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add connection information to exceptions #1155

Closed
andy-maier opened this issue Mar 30, 2018 · 3 comments
Closed

Add connection information to exceptions #1155

andy-maier opened this issue Mar 30, 2018 · 3 comments

Comments

@andy-maier
Copy link
Contributor

Today, pywbem exceptions do not contain any information to relate the issue to a server connection. This would be particularly useful for connection-related issues, but also useful for e.g. CIM errors.

The idea is to add fields to the exception for the connection id and for the server url. Probably it makes sense to have that in the message, at least for connection related exceptions.

@andy-maier
Copy link
Contributor Author

PR #1287 (merged) addresses this issue for most cases, except the exceptions raised in tupleparse.
Another PR will address the remaining cases.

@andy-maier
Copy link
Contributor Author

The solution for the remaining cases of raising pywbem exceptions is as follows:

  • For the tupleparse module: Put the module-global parse_...() and most other functions into a new class that stores the connection ID as an instance attribute.
  • For the tupletree module: Add the connection ID as an additional optional argument to the three relevant functions of that module that raise exceptions.

@andy-maier
Copy link
Contributor Author

andy-maier commented Aug 20, 2018

PR #1348 addresses the remaining occurrences of raising pywbem exceptions, in tupleparse and tupletree. This completely fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant