title: Store exception body in variable
body: <p>Is there a way to execute a <code>try</code> statement and return the error body as a variable?</p>
  
  <p>i.e.</p>
  
  <pre><code>var = ''
  try:
      error generating code
  except:
      var = exception_body
  </code></pre>