func (e Error) HasStack() bool {
	return len(e.Stack) > 0
}
HasStack returns true if the Error instance is created using Append/AppendInline/AppendErr funcs.
package errors
import (
	"fmt"
	"runtime"
	"strings"
	"github.com/satori/go.uuid"
)
var (
	Prefix = ""
)
type Error struct {
	ID string `json:"id"`
	Message string `json:"message"`
	Appended bool `json:"appended"`
	Stack []Error `json:"stack"`  
}
func New(errMsg string) Error {
	uidv4, _ := uuid.NewV4()  
	return Error{
		ID:      uidv4.String(),
		Message: Prefix + errMsg,
	}
}
func NewFromErr(err error) *Error {
	if err == nil {
		return nil
	}
	errp := New(err.Error())
	return &errp
}
func (e Error) Equal(e2 Error) bool {
	return e.ID == e2.ID || e.Error() == e2.Error()
}
func (e Error) Empty() bool {
	return e.Message == ""
}
func (e Error) NotEmpty() bool {
	return !e.Empty()
}
func (e Error) String() string {
	return e.Message
}
func (e Error) Error() string {
	return e.String()
}
func (e Error) Format(a ...interface{}) Error {
	e.Message = fmt.Sprintf(e.Message, a...)
	return e
}
func omitNewLine(message string) string {
	if strings.HasSuffix(message, "\n") {
		return message[0 : len(message)-2]
	} else if strings.HasSuffix(message, "\\n") {
		return message[0 : len(message)-3]
	}
	return message
}
func (e Error) AppendInline(format string, a ...interface{}) Error {
	msg := fmt.Sprintf(format, a...)
	e.Message += msg
	e.Appended = true
	e.Stack = append(e.Stack, New(omitNewLine(msg)))
	return e
}
func (e Error) Append(format string, a ...interface{}) Error {
	if e.Message != "" {
		e.Message += "\n"
	}
	return e.AppendInline(format, a...)
}
func (e Error) AppendErr(err error) Error {
	return e.Append(err.Error())
}