diff --git a/exceptions/auth.go b/exceptions/auth.go index e452ceb..af0ed46 100644 --- a/exceptions/auth.go +++ b/exceptions/auth.go @@ -31,5 +31,5 @@ func NewUnauthorizedError(msg string) *UnauthorizedError { } func (e UnauthorizedError) Error() string { - return fmt.Sprintf("Unauthorized: %s", e.Message) + return fmt.Sprintf("用户未获得授权: %s", e.Message) } diff --git a/exceptions/illegal_arguments.go b/exceptions/illegal_arguments.go index 8760a4d..e6871ae 100644 --- a/exceptions/illegal_arguments.go +++ b/exceptions/illegal_arguments.go @@ -15,5 +15,5 @@ func NewIllegalArgumentsError(msg string, arguments ...string) IllegalArgumentsE } func (e IllegalArgumentsError) Error() string { - return fmt.Sprintf("Illegal Arguments, %s", e.Message) + return fmt.Sprintf("使用了非法参数, %s", e.Message) } diff --git a/exceptions/improper_operate.go b/exceptions/improper_operate.go index 4ac7626..f2fba06 100644 --- a/exceptions/improper_operate.go +++ b/exceptions/improper_operate.go @@ -15,5 +15,5 @@ func NewImproperOperateError(msg string, arguments ...string) ImproperOperateErr } func (e ImproperOperateError) Error() string { - return fmt.Sprintf("Improper Operate, %s", e.Message) + return fmt.Sprintf("操作不恰当, %s", e.Message) } diff --git a/exceptions/not_found.go b/exceptions/not_found.go index 14065ba..4bc8ae1 100644 --- a/exceptions/not_found.go +++ b/exceptions/not_found.go @@ -11,7 +11,7 @@ func NewNotFoundError(msg string) *NotFoundError { } func NewNotFoundErrorFromError(msg string, err error) *NotFoundError { - return &NotFoundError{Message: fmt.Sprintf("%s,%v", msg, err)} + return &NotFoundError{Message: fmt.Sprintf("所需数据未找到,%s,%v", msg, err)} } func (e NotFoundError) Error() string { diff --git a/exceptions/unsuccessful.go b/exceptions/unsuccessful.go index 22a9da9..0309658 100644 --- a/exceptions/unsuccessful.go +++ b/exceptions/unsuccessful.go @@ -7,5 +7,5 @@ func NewUnsuccessfulOperationError() *UnsuccessfulOperationError { } func (UnsuccessfulOperationError) Error() string { - return "Unsuccessful Operation" + return "操作不成功。" }