|
|
@@ -131,14 +131,14 @@ func processRPC2(jsonStr string) *C.char {
|
|
|
|
|
|
req, err := jsonrpc2.ParseRequest(jsonStr)
|
|
|
if err != nil {
|
|
|
- w := jsonrpc2.BuildError(nil, jsonrpc2.ErrParse, "")
|
|
|
+ w := jsonrpc2.BuildError(nil, jsonrpc2.ErrParse, err.Error())
|
|
|
return wret(w)
|
|
|
}
|
|
|
|
|
|
call := func(f func(*jsonrpc2.Request) (*jsonrpc2.Response, error)) *jsonrpc2.Response {
|
|
|
- w, e := f(req)
|
|
|
- if e != nil { // 调用本地RPC函数执行时发生错误
|
|
|
- return jsonrpc2.BuildError(req, jsonrpc2.ErrInternal, "")
|
|
|
+ w, err := f(req)
|
|
|
+ if err != nil { // 调用本地RPC函数执行时发生错误
|
|
|
+ return jsonrpc2.BuildError(req, jsonrpc2.ErrInternal, err.Error())
|
|
|
}
|
|
|
return w
|
|
|
}
|