Commit 3ab7aac0 authored by 李志信's avatar 李志信

fix: add error msg

parent 33cb3cd6
...@@ -139,7 +139,8 @@ func (jsp *jsonStructParser) cb(key []byte, value []byte, dataType jsonparser.Va ...@@ -139,7 +139,8 @@ func (jsp *jsonStructParser) cb(key []byte, value []byte, dataType jsonparser.Va
Type: userDefinedType, Type: userDefinedType,
}) })
default: default:
log.Println("warning: dataType ", string(value), " in json is not supported") log.Printf("error: dataType %s in json is not supported", string(value))
return perrors.Errorf("dataType %s in json is not supported", string(value))
} }
return nil return nil
} }
...@@ -190,7 +191,8 @@ func (jsp *jsonStructParser) json2Struct(jsonData []byte) interface{} { ...@@ -190,7 +191,8 @@ func (jsp *jsonStructParser) json2Struct(jsonData []byte) interface{} {
v.Field(i).SetBool(true) v.Field(i).SetBool(true)
} }
default: default:
log.Println("warning val: ", valStr, " in value is not supported") log.Printf("error: val %s in value is not supported", valStr)
return perrors.Errorf("val %s in value is not supported", valStr)
} }
} }
s := v.Addr().Interface() s := v.Addr().Interface()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment