summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/init.go b/init.go
index 799add6..c3c0aea 100644
--- a/init.go
+++ b/init.go
@@ -2,16 +2,20 @@
//package ui
package main
-// TODO this will be system-defined
-func initpanic(err error) {
- panic("failure during init: " + err.Error())
-}
+import (
+ "os"
+)
func init() {
initDone := make(chan error)
go ui(initDone)
err := <-initDone
if err != nil {
- initpanic(err)
+ // TODO provide copying instructions? will need to be system-specific
+ MsgBoxError("UI Library Init Failure",
+ "A failure occured during UI library initialization:\n%v\n" +
+ "Please report this to the application developer or on http://github.com/andlabs/ui.",
+ err)
+ os.Exit(1)
}
}