title: Split an exception into it's exception type and message
body: <p>I have program which requires a &quot;check mode&quot; in which all errors are logged but not raised to accommodate this I have built a log_crash function which takes an error type and an error message this all works well but I also have some instances where I need to just wrap everything in a big try/except block and catch any exception thrown. E.g.</p>
  <pre class="lang-py prettyprint-override"><code>try:
      #code block
  except Exception as Err:
      log(Err)
  </code></pre>
  <p>I'm trying to find how I can split the error back up into the message and error type (the x in the code below):</p>
  <pre class="lang-py prettyprint-override"><code>def split_err(err):
      x
  
  
  err = Exception(&quot;this is an exception&quot;)
  err_type, message = split_err(err)
  </code></pre>
  <p>Thanks</p>