func WrapPrefix(e interface{}, prefix string, skip int) *Error {
	err := Wrap(e, 1+skip)
	if err.prefix != "" {
		prefix = fmt.Sprintf("%s: %s", prefix, err.prefix)
	}
	return &Error{
		Err:    err.Err,
		stack:  err.stack,
		prefix: prefix,
	}
}
WrapPrefix makes an Error from the given value. If that value is already an
error then it will be used directly, if not, it will be passed to
fmt.Errorf("%v"). The prefix parameter is used to add a prefix to the
error message when calling Error(). The skip parameter indicates how far
up the stack to start the stacktrace. 0 is from the current call,
1 from its caller, etc.
package errors
import (
	"bytes"
	"fmt"
	"reflect"
	"runtime"
)
var MaxStackDepth = 50
type Error struct {
	Err    error
	stack  []uintptr
	frames []StackFrame
	prefix string
}
func New(e interface{}) *Error {
	var err error
	switch e := e.(type) {
	case error:
		err = e
	default:
		err = fmt.Errorf("%v", e)
	}
	stack := make([]uintptr, MaxStackDepth)
	length := runtime.Callers(2, stack[:])
	return &Error{
		Err:   err,
		stack: stack[:length],
	}
}
func Wrap(e interface{}, skip int) *Error {
	var err error
	switch e := e.(type) {
	case *Error:
		return e
	case error:
		err = e
	default:
		err = fmt.Errorf("%v", e)
	}
	stack := make([]uintptr, MaxStackDepth)
	length := runtime.Callers(2+skip, stack[:])
	return &Error{
		Err:   err,
		stack: stack[:length],
	}
}