2015-11-18 19:53:47
0
I'm writing a fault tolerant HTTP client with the requests library and I want to handle all the exceptions that are defined in requests.exceptions
Here are the exception that are defined within requests.exceptions:
'''
exceptions.BaseHTTPError exceptions.HTTPError exceptions.ProxyError exceptions.TooManyRedirects
exceptions.ChunkedEncodingError exceptions.InvalidSchema exceptions.RequestException exceptions.URLRequired
exceptions.ConnectionError exceptions.InvalidURL exceptions.SSLError
exceptions.ContentDecodingError exceptions.MissingSchema exceptions.Timeout
'''
When I use pylint on my application, I'm getting an error message as described in http://pylint-messages.wikidot.com/messages:e0701 which indicates that the order is not correct. What is the proper order I should be catching the errors in (so as to not mask a more specific error by catching the generic one first), and is there a general purpose way to determine this?