mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
fix: editor提示被遮挡问题修复等
This commit is contained in:
@@ -21,7 +21,7 @@ func ErrIsNil(err error, msgAndParams ...any) {
|
||||
panic(errorx.NewBiz(err.Error()))
|
||||
}
|
||||
|
||||
panic(errorx.NewBiz(msgAndParams[0].(string), msgAndParams[1:]...))
|
||||
panic(errorx.NewBizf(msgAndParams[0].(string), msgAndParams[1:]...))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func ErrIsNilI(ctx context.Context, err error, msgId i18n.MsgId, attrs ...any) {
|
||||
|
||||
func ErrNotNil(err error, msg string, params ...any) {
|
||||
if err == nil {
|
||||
panic(errorx.NewBiz(msg, params...))
|
||||
panic(errorx.NewBizf(msg, params...))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func ErrNotNil(err error, msg string, params ...any) {
|
||||
// biz.ErrIsNilAppendErr(err, "xxxx: %s")
|
||||
func ErrIsNilAppendErr(err error, msg string) {
|
||||
if err != nil {
|
||||
panic(errorx.NewBiz(msg, err.Error()))
|
||||
panic(errorx.NewBizf(msg, err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,13 +63,13 @@ func ErrIsNilAppendErr(err error, msg string) {
|
||||
// biz.ErrIsNilAppendErr(err, "xxxx: %s")
|
||||
func ErrIsNilAppendErrI(ctx context.Context, err error, msgId i18n.MsgId) {
|
||||
if err != nil {
|
||||
panic(errorx.NewBiz(i18n.TC(ctx, msgId), err.Error()))
|
||||
panic(errorx.NewBizf(i18n.TC(ctx, msgId), err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
func IsTrue(exp bool, msg string, params ...any) {
|
||||
if !exp {
|
||||
panic(errorx.NewBiz(msg, params...))
|
||||
panic(errorx.NewBizf(msg, params...))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,19 +87,19 @@ func IsTrueBy(exp bool, err *errorx.BizError) {
|
||||
|
||||
func NotEmpty(str string, msg string, params ...any) {
|
||||
if str == "" {
|
||||
panic(errorx.NewBiz(msg, params...))
|
||||
panic(errorx.NewBizf(msg, params...))
|
||||
}
|
||||
}
|
||||
|
||||
func NotNil(data any, msg string, params ...any) {
|
||||
if reflect.ValueOf(data).IsNil() {
|
||||
panic(errorx.NewBiz(msg, params...))
|
||||
panic(errorx.NewBizf(msg, params...))
|
||||
}
|
||||
}
|
||||
|
||||
func NotBlank(data any, msg string, params ...any) {
|
||||
if anyx.IsBlank(data) {
|
||||
panic(errorx.NewBiz(msg, params...))
|
||||
panic(errorx.NewBizf(msg, params...))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user