zwxi 11 tháng trước cách đây
mục cha
commit
f896472e3f
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      controllers/excel.go

+ 4 - 0
controllers/excel.go

@@ -49,20 +49,24 @@ func (this *ExcelController) ExcelDetail()  {
 	b, e := ioutil.ReadAll(resp.Body)
 	if e != nil {
 		err = fmt.Errorf("resp body read err: %s", e.Error())
+		br.ErrMsg = err.Error()
 		return
 	}
 	if len(b) == 0 {
 		err = fmt.Errorf("resp body is empty")
+		br.ErrMsg = err.Error()
 		return
 	}
 
 	result := new(models.BaseResponse)
 	if e = json.Unmarshal(b, &result); e != nil {
 		err = fmt.Errorf("result unmarshal err: %s\nresult: %s", e.Error(), string(b))
+		br.ErrMsg = err.Error()
 		return
 	}
 	if result.Ret != 200 {
 		err = fmt.Errorf("result: %s", string(b))
+		br.ErrMsg = err.Error()
 		return
 	}
 	br.Ret = 200