Merge lp:~vila/bzr/788530-better-invalid-http-response into lp:bzr
Proposed by
Vincent Ladeuil
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5921 |
Proposed branch: | lp:~vila/bzr/788530-better-invalid-http-response |
Merge into: | lp:bzr |
Diff against target: |
34 lines (+10/-1) 2 files modified
bzrlib/errors.py (+7/-1) doc/en/release-notes/bzr-2.4.txt (+3/-0) |
To merge this branch: | bzr merge lp:~vila/bzr/788530-better-invalid-http-response |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email: mp+62443@code.launchpad.net |
Commit message
Don't swallow the original error when reporting an InvalidHttpResp
Description of the change
This tweaks InvalidHttpResponse so the orig_error parameter is not swallowed anymore.
This exception class is generally subclassed when a more precise reporting is desired and used as a catch-all for the other cases.
The catual implementation has the nasty side-effect of swallowing the original error making the debugging harder.
I branched lp:bzr/2.3 just in case we want to backport it (feedback welcome, I'm targeting trunk by default) and I'll add a news entry in the right file if/when approved.
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/26/2011 12:02 PM, Vincent Ladeuil wrote: ponse swallows the original error making debugging harder" /bugs.launchpad .net/bzr/ +bug/788530 /code.launchpad .net/~vila/ bzr/788530- better- invalid- http-response/ +merge/ 62443
> Vincent Ladeuil has proposed merging lp:~vila/bzr/788530-better-invalid-http-response into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> Bug #788530 in Bazaar: "InvalidHttpRes
> https:/
>
> For more details, see:
> https:/
>
> This tweaks InvalidHttpResponse so the orig_error parameter is not swallowed anymore.
>
> This exception class is generally subclassed when a more precise reporting is desired and used as a catch-all for the other cases.
>
> The catual implementation has the nasty side-effect of swallowing the original error making the debugging harder.
>
> I branched lp:bzr/2.3 just in case we want to backport it (feedback welcome, I'm targeting trunk by default) and I'll add a news entry in the right file if/when approved.
I would put the bug # in the commit message. Other than that this seems
fine.
I'm not sure that the special cases always call up the stack, and
certainly they need to do their own formatting for "orig_error". My only
concern is double-handling. (TransportError itself has an 'if orig_error
is None: block, though it just uses a plain str.)
Specifically, this adds ': %r' % (orig_error,) a child class could
easily do the same, and you get the repr of a string of a repr of the
original exception, etc.
For now, though, it seems fine. We usually add tests into tests/test_ errors. py for formatting stuff like this, though.
bzrlib/
John
=:->
merge: approve
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
eJwYACgkQJdeBCY SNAAMoKACeINxJf 7SdBnjA9Pwp8L2l rZLq W7H7fWkEYma4qiJ bC
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk3
0FoAoIxETGBhnrt
=s/uO
-----END PGP SIGNATURE-----