func (frame *StackFrame) String() string {
	str := fmt.Sprintf("%s:%d (0x%x)\n", frame.File, frame.LineNumber, frame.ProgramCounter)
	source, err := frame.SourceLine()
	if err != nil {
		return str
	}
	return str + fmt.Sprintf("\t%s: %s\n", frame.Name, source)
}
String returns the stackframe formatted in the same way as go does
in runtime/debug.Stack()
package errors
import (
	"bytes"
	"fmt"
	"io/ioutil"
	"runtime"
	"strings"
)
type StackFrame struct {
	File string
	LineNumber int
	Name string
	Package string
	ProgramCounter uintptr
}
func NewStackFrame(pc uintptr) (frame StackFrame) {
	frame = StackFrame{ProgramCounter: pc}
	if frame.Func() == nil {
		return
	}
	frame.Package, frame.Name = packageAndName(frame.Func())
	frame.File, frame.LineNumber = frame.Func().FileLine(pc - 1)
	return
}
func (frame *StackFrame) Func() *runtime.Func {
	if frame.ProgramCounter == 0 {
		return nil
	}
	return runtime.FuncForPC(frame.ProgramCounter)
}