title: How to handle ConnectionError in Python
body: <p>Currently I have the problem that I get a <code>NameError</code> for the following code:</p>
  
  <pre><code>try:
      # some network programming raising an exception
  except ConnectionError:
      # some error handling
  </code></pre>
  
  <p>This does not work, because you have to import <code>ConnectionError</code> from some module, which is not mentioned in the documentation (maybe I'm just blind?).
  All I found is <a href="https://stackoverflow.com/questions/9054820/python-requests-exception-handling">this</a>, but it refers to another request library.</p>