main print console output for js statement given by the exec argument

pull/1659/head
Bas van Kervel 9 years ago
parent 0ef80bb3d0
commit 87d1cde7e4
  1. 7
      cmd/geth/js.go

@ -232,15 +232,10 @@ func (self *jsre) loadAutoCompletion() {
} }
func (self *jsre) batch(statement string) { func (self *jsre) batch(statement string) {
val, err := self.re.Run(statement) err := self.re.EvalAndPrettyPrint(statement)
if err != nil { if err != nil {
fmt.Printf("error: %v", err) fmt.Printf("error: %v", err)
} else if val.IsDefined() && val.IsObject() {
obj, _ := self.re.Get("ret_result")
fmt.Printf("%v", obj)
} else if val.IsDefined() {
fmt.Printf("%v", val)
} }
if self.atexit != nil { if self.atexit != nil {

Loading…
Cancel
Save