mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
tests: simplify code
This commit is contained in:
parent
cbbf686ecc
commit
7672d605d8
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ func checkDecodeFromJSON(s *rlp.Stream, exp interface{}) error {
|
|||
}
|
||||
|
||||
func addStack(op string, val interface{}, err error) error {
|
||||
lines := strings.Split(err.Error(), "\n")
|
||||
lines := []string{err.Error()}
|
||||
lines = append(lines, fmt.Sprintf("\t%s: %v", op, val))
|
||||
return errors.New(strings.Join(lines, "\n"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue