This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dstufft
Recipients Claudiu.Popa, dstufft, eric.araujo, ezio.melotti, flox, loewis, rhettinger
Date 2013-08-26.02:35:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377484549.14.0.671570782094.issue13397@psf.upfronthosting.co.za>
In-reply-to
Content
Well you could possibly whitelist some exceptions although I still think that's ultimately a bad idea because it means to prevent the remote server (or someone in the middle of the connection) from being able to crash your program with an arbitrary exception it means you'd need to catch _all_ the whitelisted exceptions.

You could possibly make exception subclasses that subclass the Fault exception _and_ whatever exception the remote server threw so you could get the advantages of both sides.

One flaw in this though is that the remote server doesn't need to be in Python, so trying to map errors from the remote server into python exceptions is only going to work *if* the remote server is in Python (and even then only if the exception is a built in one and not any other exception). Yanking the text out of the error message and trying to turn that into an exception is fundamentally wrong I believe. It's a bit like reading the response body of a HTTP request and doing simple string searching to raise arbitrary exceptions (In fact that's basically exactly what it is).
History
Date User Action Args
2013-08-26 02:35:49dstufftsetrecipients: + dstufft, loewis, rhettinger, ezio.melotti, eric.araujo, flox, Claudiu.Popa
2013-08-26 02:35:49dstufftsetmessageid: <1377484549.14.0.671570782094.issue13397@psf.upfronthosting.co.za>
2013-08-26 02:35:49dstufftlinkissue13397 messages
2013-08-26 02:35:48dstufftcreate