summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go20
1 files changed, 13 insertions, 7 deletions
diff --git a/main.go b/main.go
index b2c0fd7..8e75031 100644
--- a/main.go
+++ b/main.go
@@ -35,12 +35,6 @@ func init() {
log.Sleep(.1) // probably not needed, but in here for now under development
}
-func Exit() {
- // TODO: what should actually happen here?
- log.Log(NOW, "Exit() here. doing standardExit()")
- standardExit()
-}
-
func standardExit() {
log.Log(NOW, "standardExit() doing baseGui.Close()")
me.baseGui.Close()
@@ -56,6 +50,17 @@ func standardExit() {
os.Exit(0)
}
+func standardClose() {
+ log.Log(NOW, "standardExit() doing baseGui.Close()")
+ me.baseGui.Close()
+ log.Log(NOW, "standardExit() doing outf.Close()")
+ outf.Close()
+ os.Stdin = os.Stdin
+ os.Stdout = os.Stdout
+ os.Stderr = os.Stderr
+ log.Log(NOW, "standardExit() send back Quit()")
+}
+
var outf *os.File
func main() {
@@ -66,9 +71,10 @@ func mainGogui() {
if r := recover(); r != nil {
log.Warn("YAHOOOO Recovered in guiMain application:", r)
log.Warn("Recovered from panic:", r)
+ me.myTree.SendToolkitPanic()
log.Warn("Stack trace:")
debug.PrintStack()
- me.myTree.SendToolkitPanic()
+ // panic("BUMMER")
return
}
}()