Add defer rescued back in

This commit is contained in:
obscuren 2015-01-16 14:51:38 +01:00
parent d5d9746ca3
commit acc8f7fadc
1 changed files with 5 additions and 0 deletions

View File

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