This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package nstatus
import (
"git.noahlan.cn/noahlan/ntool-biz/core/nstatus/code"
"git.noahlan.cn/noahlan/ntool-biz/core/nstatus/msg"
)
/**
业务代码类型错误,错误状态码统一为500,详细状态码在返回体中
*/
// NewBizErr 构建业务错误
func NewBizErr(code int, message string) error {
return NewResult(code, message, BizErr)
}
// NewBizErrWithCode 通过Code构建业务错误
func NewBizErrWithCode(c code.Code) error {
return NewBizErr(int(c), msg.Msg(c))
// NewBizErrNoMsg 构建业务错误,空错误消息
func NewBizErrNoMsg(code int) error {
return NewBizErr(code, "")