[MERGE][#263527] Do not traceback on unexpected error responses from a smart server.
Andrew Bennetts
andrew at canonical.com
Fri Sep 5 07:02:42 BST 2008
This is a pretty simple patch. It stops bzr from spewing a traceback to a user
when a server sends an unexpected error response. Generally that's a sign of a
problem on the server, not in the client, so there's not much point dumping a
client-side traceback.
In the comments of <https://bugs.launchpad.net/bzr/+bug/263527> John suggested
simply switching ErrorFromSmartServer's internal_error flag to False. I've
taken a slightly more complex route, because I see ErrorFromSmartServer as an
internal error. Instead I've added an UntranslateableErrorFromSmartServer
exception, which allows the code to distinguish between “whoops I totally forgot
to catch that exception” and “what the server said makes no sense”. I've tried
to make these distinct purposes clear in the code.
I'm not thrilled with the name “UntranslateableErrorFromSmartServer”, so
alternative suggestions are welcome. I'm not greatly bothered by the name
though, given that this should be a rare exception.
-Andrew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nicer-error-3691.patch
Type: text/x-diff
Size: 9373 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080905/eac4fbd7/attachment.bin
More information about the bazaar
mailing list