title: How to catch an exception message in python?
body: <p>I want something of the form</p>
  
  <pre><code>try:
    # code
  except *, error_message:
    print(error_message)
  </code></pre>
  
  <p>i.e I want to have a generic except block that catches all types of exceptions and prints an error message. Eg. "ZeroDivisionError: division by zero". Is it possible in python?</p>
  
  <p>If I do the following I can catch all exceptions, but I won't get the error message.</p>
  
  <pre><code>try:
    # code
  except:
    print("Exception occurred")
  </code></pre>