瀏覽代碼

just overload to not get it by mistake again ... (#14440)

tags/v1.15.0-dev
6543 3 年之前
父節點
當前提交
4acb499f30
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      modules/context/api.go

+ 5
- 0
modules/context/api.go 查看文件

@@ -73,6 +73,11 @@ type APIRedirect struct{}
// swagger:response string
type APIString string

// ServerError responds with error message, status is 500
func (ctx *APIContext) ServerError(title string, err error) {
ctx.Error(http.StatusInternalServerError, title, err)
}

// Error responds with an error message to client with given obj as the message.
// If status is 500, also it prints error to log.
func (ctx *APIContext) Error(status int, title string, obj interface{}) {

Loading…
取消
儲存