title: python exception handling
body: <p>I am developing a Django site and have been having trouble trying to work out the best way to do exception handling. I have been doing</p>
  
  <pre><code>try:
      Some code
  except:
      log error in my own words, i.e 'Some code' failed to execute
      Some other code
  </code></pre>
  
  <p>This catches all exceptions thus ensuring my site does not deliver 500 errors and such like. But, with my limited knowledge I am losing the actual exception and it is making it a real pain to debug. How do I print the error that occured? Currently I comment out try: catch: and see the error and fix it. There must be a better way!</p>
  
  <p>Thanks in advance</p>
  
  <p>Rich</p>