We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manufacturer, err := repo.GetManufacturerBySn(row.Sn) if err != nil { w.WriteJSON(map[string]interface{}{"Status": "error", "Message": "参数错误" + err.Error()}) return }
类似以上这样的错误处理方式,如果调用数据层接口,一旦返回error就认定是参数错误是不合适的。举个反例:如果db挂了,那么调用数据层一定会返回error,这时候把原因归结为参数错误,显然就不合适了。
参数错误
The text was updated successfully, but these errors were encountered:
No branches or pull requests
类似以上这样的错误处理方式,如果调用数据层接口,一旦返回error就认定是
参数错误
是不合适的。举个反例:如果db挂了,那么调用数据层一定会返回error,这时候把原因归结为参数错误,显然就不合适了。The text was updated successfully, but these errors were encountered: