Browse Source

Add Result.String

pull/1780/head
Jae Kwon 8 years ago
parent
commit
05096de368
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      example/dummy/dummy.go
  2. +5
    -1
      types/result.go

+ 1
- 1
example/dummy/dummy.go View File

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


+ 5
- 1
types/result.go View File

@ -28,7 +28,11 @@ func (res Result) IsErr() bool {
}
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 {


Loading…
Cancel
Save