debug gocui.MainLoop() panic error
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d4c2f8cb1b
commit
4800fe6620
2
click.go
2
click.go
|
@ -239,7 +239,7 @@ func click(g *gocui.Gui, v *gocui.View) error {
|
|||
}
|
||||
|
||||
if _, err := g.SetCurrentView(v.Name()); err != nil {
|
||||
log.Log(NOW, "click() END err =", err)
|
||||
log.Log(NOW, "click() END v.Name =", v.Name(), "err =", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
4
main.go
4
main.go
|
@ -158,9 +158,13 @@ func gocuiMain() {
|
|||
|
||||
if err := defaultKeybindings(g); err != nil {
|
||||
// normally panic here
|
||||
log.Log(NOW, "defaultKeybindings(g) panic err =", err)
|
||||
panic("gocuiTKdefaultkeybindings OOPS")
|
||||
}
|
||||
|
||||
if err := g.MainLoop(); err != nil && !errors.Is(err, gocui.ErrQuit) {
|
||||
log.Log(NOW, "g.MainLoop() panic err =", err)
|
||||
// normally panic here
|
||||
panic("gocuiTKmainloop OOPS")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue