Rev 5921: (vila) Don't swallow the original error when reporting an in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu May 26 21:41:52 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5921 [merge]
revision-id: pqm at pqm.ubuntu.com-20110526214150-1jlkzbijcodszro6
parent: pqm at pqm.ubuntu.com-20110526174823-e1cfgzd0lcvsszcr
parent: v.ladeuil+lp at free.fr-20110526202420-njbddabhhtkx0akw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2011-05-26 21:41:50 +0000
message:
(vila) Don't swallow the original error when reporting an
InvalidHttpResponse. (Vincent Ladeuil)
modified:
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py 2011-05-26 08:05:45 +0000
+++ b/bzrlib/errors.py 2011-05-26 20:22:44 +0000
@@ -1715,10 +1715,16 @@
class InvalidHttpResponse(TransportError):
- _fmt = "Invalid http response for %(path)s: %(msg)s"
+ _fmt = "Invalid http response for %(path)s: %(msg)s%(orig_error)s"
def __init__(self, path, msg, orig_error=None):
self.path = path
+ if orig_error is None:
+ orig_error = ''
+ else:
+ # This is reached for obscure and unusual errors so we want to
+ # preserve as much info as possible to ease debug.
+ orig_error = ': %r' % (orig_error,)
TransportError.__init__(self, msg, orig_error=orig_error)
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-05-26 16:28:31 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-05-26 20:24:20 +0000
@@ -32,6 +32,9 @@
.. Fixes for situations where bzr would previously crash or give incorrect
or undesirable results.
+* Reports the original error when an InvalidHttpResponse exception is
+ encountered to facilitate debug. (Vincent Ladeuil, #788530)
+
Documentation
*************
More information about the bazaar-commits
mailing list