cmd/evm: change error msg output to stderr (#17118)

* cmd/evm: change error msg output to stderr

* cmd/evm: fix some linter error
This commit is contained in:
Chen Quan
2018-07-31 15:48:27 +08:00
committed by Péter Szilágyi
parent d927cbb638
commit fb9f7261ec
5 changed files with 23 additions and 22 deletions

View File

@ -30,10 +30,11 @@ func Compile(fn string, src []byte, debug bool) (string, error) {
bin, compileErrors := compiler.Compile()
if len(compileErrors) > 0 {
// report errors
errs := ""
for _, err := range compileErrors {
fmt.Printf("%s:%v\n", fn, err)
errs += fmt.Sprintf("%s:%v\n", fn, err)
}
return "", errors.New("compiling failed")
return "", errors.New(errs + "compiling failed\n")
}
return bin, nil
}