title: Can I recover from panic, handle the error, then panic again and keep the original stack trace?
body: <p>Is it possible to "rethrow" an error from <code>recover</code> and keep the original stack trace? The best I know how to do is to panic again, but that does create a new stacktrace.</p>
  
  <pre><code>func do() {
      defer func() {
          cleanUp()
          if x := recover(); x != nil {
              handleError()
              panic(x)
          }
      }()
      doStuff()
  }
  </code></pre>
  
  <p>My motivation for wanting this is that unless my function exits normally or <code>handleError</code> runs, my program deadlocks. And unless I preserve the original strack trace, I do not know where it crashed.</p>