func (e Error) StackTrace() string {
	rs := "\n"
	for _, v := range e.StackTraces {
		rs = rs + v + "\n"
	}
	return rs
}
return its stacktrace
package errorx
import (
	"encoding/json"
	"errors"
	"fmt"
	"reflect"
	"runtime"
	"strconv"
	"strings"
	"time"
)
const (
	LcauseBy = 1 << iota
	LdateTime
	Llongfile
)
type Error struct {
	index int
	E           error
	StackTraces []string
	isServiceErr   bool
	serviceErrcode int
	serviceErrmsg  string
	Context map[string]interface{}
	Header  map[string][]string
	ReGenerated bool
	Errors      []error
	Flag        int
	Keyword     string
}
func (e Error) String() string {
	return e.Error()
}
func (e *Error) SetHeader(key string, value string) {
	if e.Header == nil {
		e.Header = make(map[string][]string, 0)
	}
	if e.Header[key] == nil {
		e.Header[key] = make([]string, 0, 10)
	}
	if len(e.Header[key]) == 0 {
		e.Header[key] = append(e.Header[key], value)
	} else {
		e.Header[key][0] = value
	}
}
func (e Error) GetHeader(key string) string {
	if e.Header == nil {
		return ""
	}
	if e.Header[key] == nil || len(e.Header[key]) == 0 {
		return ""
	}
	return e.Header[key][0]
}
func Empty() Error {
	return Error{
		index:       0,
		E:           nil,
		StackTraces: make([]string, 0, 30),
		Context:     make(map[string]interface{}, 0),
		ReGenerated: false,
		Errors:      make([]error, 0, 30),
		Flag:        Llongfile | LcauseBy | LdateTime,
	}
}
func (e Error) Error() string {
	var header = ""
	if len(e.Header) != 0 {
		buf, _ := json.MarshalIndent(e.Header, "  ", "  ")
		header += fmt.Sprintf("header:\n%s\n", buf)
	}
	rs := fmt.Sprintf("%s%s\n", header, e.StackTraceValue())
	if len(e.Context) != 0 {
		buf, _ := json.MarshalIndent(e.Context, "  ", "  ")
		rs += fmt.Sprintf("context:\n%s\n", buf)
	}
	return rs
}
func (e Error) BasicError() string {
	if e.E != nil {
		return e.E.Error()
	}
	return ""
}