Commit 1e853451 authored by AlexStocks's avatar AlexStocks

Mod: bug fix to run

parent 7cdc4714
......@@ -17,6 +17,7 @@ import (
import (
"github.com/AlexStocks/getty/rpc"
log "github.com/AlexStocks/log4go"
jerrors "github.com/juju/errors"
config "github.com/koding/multiconfig"
)
......@@ -42,7 +43,7 @@ func initConf() {
return
}
conf := new(rpc.ClientConfig)
conf = new(rpc.ClientConfig)
config.MustLoadWithPath(confFile, conf)
if err := conf.CheckValidity(); err != nil {
panic(jerrors.ErrorStack(err))
......
......@@ -131,6 +131,7 @@ func test() {
var errResult int
err = client.Call(rpc.CodecJson, "127.0.0.1:20000", "TestRpc", "Err", 2, &errResult)
if err != nil {
// error test case, this invocation should step into this branch.
log.Error("client.Call(TestRpc::Err) = error:%s", jerrors.ErrorStack(err))
return
}
......
......@@ -18,8 +18,8 @@ import (
import (
"github.com/AlexStocks/getty/rpc"
log "github.com/AlexStocks/log4go"
config "github.com/koding/multiconfig"
jerrors "github.com/juju/errors"
config "github.com/koding/multiconfig"
)
const (
......@@ -42,6 +42,7 @@ func initConf() {
panic(fmt.Sprintf("application configure file name{%v} suffix must be .toml", confFile))
return
}
conf = &rpc.ServerConfig{}
config.MustLoadWithPath(confFile, conf)
if err := conf.CheckValidity(); err != nil {
panic(jerrors.ErrorStack(err))
......
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