Skip to content

Commit

Permalink
Prevent print from panicking
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Jul 2, 2021
1 parent c7f0e87 commit 5e5cbeb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ func (dbg *Debugger) eval(expr string) (v Value, err error) {
}

func (dbg *Debugger) getValue(varName string) (val Value, err error) {
defer func() {
if err := recover(); err != nil {
return
}
}()

// copied from loadDynamicRef
name := unistring.String(varName)
for stash := dbg.vm.stash; stash != nil; stash = stash.outer {
Expand Down

0 comments on commit 5e5cbeb

Please sign in to comment.