mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
add error stack for internal error printing
This commit is contained in:
@ -63,7 +63,7 @@ func BeEncode(values ...interface{}) []byte {
|
||||
buf.Write(BeEncodeFloat64(value))
|
||||
default:
|
||||
if err := binary.Write(buf, binary.BigEndian, value); err != nil {
|
||||
intlog.Error(context.TODO(), err)
|
||||
intlog.Errorf(context.TODO(), `%+v`, err)
|
||||
buf.Write(BeEncodeString(fmt.Sprintf("%v", value)))
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ func LeEncode(values ...interface{}) []byte {
|
||||
buf.Write(LeEncodeFloat64(value))
|
||||
default:
|
||||
if err := binary.Write(buf, binary.LittleEndian, value); err != nil {
|
||||
intlog.Error(context.TODO(), err)
|
||||
intlog.Errorf(context.TODO(), `%+v`, err)
|
||||
buf.Write(LeEncodeString(fmt.Sprintf("%v", value)))
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ func getEncoding(charset string) encoding.Encoding {
|
||||
}
|
||||
enc, err := ianaindex.MIB.Encoding(charset)
|
||||
if err != nil {
|
||||
intlog.Error(context.TODO(), err)
|
||||
intlog.Errorf(context.TODO(), `%+v`, err)
|
||||
}
|
||||
return enc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user