introduce errors pkg

This commit is contained in:
Anton Kaliaev
2017-03-09 19:00:05 +04:00
parent ff90224ba8
commit db69845ded
5 changed files with 20 additions and 16 deletions

View File

@ -2,12 +2,12 @@ package rpcclient
import (
"encoding/json"
"fmt"
"net"
"net/http"
"time"
"github.com/gorilla/websocket"
"github.com/pkg/errors"
cmn "github.com/tendermint/go-common"
types "github.com/tendermint/go-rpc/types"
)
@ -104,7 +104,7 @@ func (wsc *WSClient) receiveEventsRoutine() {
continue
}
if response.Error != "" {
wsc.ErrorsCh <- fmt.Errorf(response.Error)
wsc.ErrorsCh <- errors.Errorf(response.Error)
continue
}
wsc.ResultsCh <- *response.Result