[MERGE][#263527] Do not traceback on unexpected error responses from a smart server.
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 5 16:06:05 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> 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.
>
>
BB:tweak
Any reason not to use: UnknownErrorFromSmartServer?
It seems a little bit easier than "Untranslateable".
I'm fine either way, and I agree that it is the correct route to go. I
thought the whole case was uncaught, but I was misunderstanding the logic.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjBSt0ACgkQJdeBCYSNAAMTTgCgl5GlG0LQhD93pVNAMFR1Rktt
lDgAoNhR4bL8K9PilBsQlTzGIUCG10Ve
=B4h8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list