This commit is contained in:
bas-vk 2015-12-15 10:57:44 +00:00
commit 64f25c967a
2 changed files with 4 additions and 10 deletions

View file

@ -394,15 +394,6 @@ func (self *jsre) UnlockAccount(addr []byte) bool {
} }
} }
func (self *jsre) exec(filename string) error {
if err := self.re.Exec(filename); err != nil {
self.re.Stop(false)
return fmt.Errorf("Javascript Error: %v", err)
}
self.re.Stop(true)
return nil
}
func (self *jsre) interactive() { func (self *jsre) interactive() {
// Read input lines. // Read input lines.
prompt := make(chan string) prompt := make(chan string)

View file

@ -461,7 +461,10 @@ func execScripts(ctx *cli.Context) {
client, false, nil) client, false, nil)
for _, file := range ctx.Args() { for _, file := range ctx.Args() {
repl.exec(file) if err := repl.re.Exec(file); err != nil {
fmt.Errorf("Javascript Error: %v", err)
break
}
} }
node.Stop() node.Stop()
} }