TODO: send os.Stdout to stdout view
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e8b090efe6
commit
d29c56e22d
8
main.go
8
main.go
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue