Add Result.String

This commit is contained in:
Jae Kwon 2017-01-15 14:43:16 -08:00
parent 6526ab2137
commit 05096de368
2 changed files with 6 additions and 2 deletions

View File

@ -4,10 +4,10 @@ import (
"encoding/hex" "encoding/hex"
"strings" "strings"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common" . "github.com/tendermint/go-common"
"github.com/tendermint/go-merkle" "github.com/tendermint/go-merkle"
"github.com/tendermint/go-wire" "github.com/tendermint/go-wire"
"github.com/tendermint/abci/types"
) )
type DummyApplication struct { type DummyApplication struct {

View File

@ -28,7 +28,11 @@ func (res Result) IsErr() bool {
} }
func (res Result) Error() string { func (res Result) Error() string {
return fmt.Sprintf("ABCI code:%v, data:%X, log:%v", res.Code, res.Data, res.Log) return fmt.Sprintf("ABCI{code:%v, data:%X, log:%v}", res.Code, res.Data, res.Log)
}
func (res Result) String() string {
return fmt.Sprintf("ABCI{code:%v, data:%X, log:%v}", res.Code, res.Data, res.Log)
} }
func (res Result) PrependLog(log string) Result { func (res Result) PrependLog(log string) Result {