WriteRespne修改

This commit is contained in:
jau1jz
2019-03-11 15:21:51 +08:00
parent 89559f0b71
commit c99ec970b0

View File

@@ -148,7 +148,7 @@ func (slf *HttpServerService) SetHttps(certfile string, keyfile string) bool {
//序列化后写入Respone
func (slf *HttpRespone) WriteRespne(v interface{}) error {
StrRet, retErr := json.Marshal(v)
if retErr == nil {
if retErr != nil {
slf.Respone = []byte(`{"Code": 2,"Message":"service error"}`)
common.LogPrintf(sysmodule.LEVER_ERROR, "Json Marshal Error")
} else {