GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Catch http lib related exceptions as HpOneViewExceptions during login by fgbulsoni · Pull Request #310 · HewlettPackard/python-hpOneView
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Conversation
Contributor
DescriptionAdded try/except block to validateVersion in order to catch host unreachable and timeout exceptions during login attempts to appliance. Issues ResolvedFixes #309 Check List
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
…nd timeout exceptions
fgbulsoni
force-pushed
the
enhancement/catch-http-lib-exceptions-as-hponeviewexceptions
branch
from
8ed7596 to
56485b1
Compare
tmiotto
suggested changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to cover every exception? An InterruptedException, for instance, should not be re-raised as a HPOneViewException, these are not SDK errors
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, what about the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you should try: raise HPOneViewException(str(e)) from e But I don't know if future will handle it well.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've just tried the On python2: On Python3: Python 2 ends up having a lot less understandable trace and message in this case
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, after trying both the Py2 exception will remain not chained while Py3 has the chaining. Do we want to keep this behavior @tmiotto ? Thoughts? Another possibility: Specifically target That way we do get better error messages, but we also do get more lines of code and still allow whatever other exception to pass through. Both feel like tradeoffs to me, ideally the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
tmiotto
approved these changes
tmiotto
deleted the
enhancement/catch-http-lib-exceptions-as-hponeviewexceptions
branch
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reviewers1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |