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:
committed by
Péter Szilágyi
parent
d927cbb638
commit
fb9f7261ec
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user