mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +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 {
|
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))
|
lines = append(lines, fmt.Sprintf("\t%s: %v", op, val))
|
||||||
return errors.New(strings.Join(lines, "\n"))
|
return errors.New(strings.Join(lines, "\n"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue