diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-15 16:27:07 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-15 16:27:07 -0500 |
| commit | 16e561c1e37e08131bc8f9705b97f4b5c38ce226 (patch) | |
| tree | d023820584f70cdc6df2952df8b0cc71c9f9d548 /init.go | |
| parent | 0e41eddf54740cb2de1ff426ffd294d3301a0d1c (diff) | |
Added message boxes and adjusted init() accordingly to display one on failure.
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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) } } |
