package ssss

import (
	"xdx.jelly/xgcl/gerrors"
)

//go:generate stringer -type=ErrorCode -linecomment -output=errors_string.go errors.go
type ErrorCode gerrors.ErrorCode

func (e ErrorCode) Error() string {
	return gerrors.Format(uint32(e), e.String())
}

// error codes
const (
	ErrInvalidInput       ErrorCode = 0x0100c000 + iota //输入不合法
	ErrRestoreFailed                                    //恢复秘密值失败
	ErrDivideZero                                       //除数为0
	ErrSharesMayBeTheSame                               //输入相同分片
	ErrNeedMoreShares                                   //分片数量不足
	ErrSecretTooLarge                                   //秘密值太大
	ErrBadShares                                        //分片错误
)
