title: How to get the stack trace pointing to actual error reason
body: <p>Let's say I have some code like this:</p>
  
  <pre><code>value, err := some3rdpartylib.DoSomething()
  if err != nil {
      panic(err)
  }
  </code></pre>
  
  <p>In case <code>err != nil</code> I will get something like this:</p>
  
  <pre><code>panic: some error explanation here
  
  goroutine 1 [running]:
  main.main()
      /tmp/blabla/main.go:6 +0x80
  </code></pre>
  
  <p>This stack trace is completely legit but sometimes these error messages may not clarify what happened and so I'd like to dig deeper into the source code of the 3rd party library to investigate what exactly causes this error to be returned. However when my code panics like this, there is no way to get the actual place that returned this error.</p>
  
  <p>A little bit more clarification: as I'm coming from JVM world where exceptions are thrown I can completely trace what exactly line of code thrown the exception and thus can easily find the place and see what gone wrong. Go stack trace ends exactly where my code panics and thus not too useful in my case.</p>
  
  <p>I've created a playground <a href="http://play.golang.org/p/5ydALOMSJi" rel="noreferrer">here</a> and ideally I'd like to be able to trace the error to the place it was actually returned from, not panic. (e.g. to line 17, <code>return "", errors.New("some error explanation here")</code>)</p>
  
  <p>Is this even possible?</p>