Add defer rescued back in

This commit is contained in:
obscuren 2015-01-16 14:51:38 +01:00
parent d5d9746ca3
commit acc8f7fadc

View File

@ -86,6 +86,11 @@ func (self *JSRepl) Stop() {
} }
func (self *JSRepl) parseInput(code string) { func (self *JSRepl) parseInput(code string) {
defer func() {
if r := recover(); r != nil {
fmt.Println("[native] error", r)
}
}()
value, err := self.re.Run(code) value, err := self.re.Run(code)
if err != nil { if err != nil {