TODO: send os.Stdout to stdout view

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-09 10:27:36 -06:00
parent e8b090efe6
commit d29c56e22d
1 changed files with 7 additions and 1 deletions

View File

@ -90,23 +90,28 @@ func mainGogui() {
log.Warn("YAHOOOO Recovered in guiMain application:", r)
log.Warn("Recovered from panic:", r)
me.baseGui.Close()
me.myTree.SendToolkitPanic()
// attempts to control STDOUT
/*
// allow gocui to close if possible, then print stack
log.Sleep(1)
me.myTree.SendToolkitLoad("nocui")
log.Sleep(3)
os.Stdout = origStdout
os.Stderr = origStderr
me.myTree.SendToolkitPanic()
log.Warn("Stack trace:")
debug.PrintStack()
// attempt to switch to the nocui toolkit
log.Sleep(1)
// panic("BUMMER")
*/
return
}
}()
// attempts to control STDOUT
/*
var err error
log.Log(INFO, "main() start Init()")
@ -125,6 +130,7 @@ func mainGogui() {
ferr, _ := os.OpenFile("/tmp/witgui.err", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
origStderr = os.Stderr
os.Stderr = ferr
*/
gocuiMain()
}