title: Python requests exception handling: How to get more verbose (user-friendly) error message?
body: <p>Let's suppose I have some function:</p>
  
  <pre><code>def get_result(url):
      try:
          return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}).text
      except requests.exceptions.ConnectionError as e:
          message = 'Connection to {0} failed. \n {1}'
          print message.format(url, e)
          sys.exit(0)
  </code></pre>
  
  <p><strong>Case #1</strong> "bad url syntax"
  url = '<a href="http://google" rel="nofollow">http://google</a>'</p>
  
  <pre><code>...
   connection to http://google failed. 
   HTTPConnectionPool(host='google', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('&lt;requests.packages.urllib3.connection.HTTPConnection object at 0x7fd417ece350&gt;: Failed to establish a new connection: [Errno -5] No address associated with hostname',))
  ...
  </code></pre>
  
  <p><strong>Case #2</strong> "non-existing url"
  url = '<a href="http://smth_non_existing.com" rel="nofollow">http://smth_non_existing.com</a>'</p>
  
  <pre><code>...
  connection to http://smth_non_existing.com failed. 
   HTTPConnectionPool(host='smth_non_existing.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('&lt;requests.packages.urllib3.connection.HTTPConnection object at 0x7fe196d4a3d0&gt;: Failed to establish a new connection: [Errno -2] Name or service not known',))
  ...
  </code></pre>
  
  <p>So I want just to print the 'last part' of the error message. In first case <em>"No address associated with hostname"</em> and second one <em>"Name or service not known"</em></p>