summaryrefslogtreecommitdiff
path: root/bitmaskd.go
diff options
context:
space:
mode:
Diffstat (limited to 'bitmaskd.go')
-rw-r--r--bitmaskd.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/bitmaskd.go b/bitmaskd.go
index b7036a6..ace9ee7 100644
--- a/bitmaskd.go
+++ b/bitmaskd.go
@@ -17,12 +17,24 @@
package main
import (
+ "errors"
+ "log"
+
"0xacab.org/leap/bitmask-systray/bitmask"
bitmaskd "0xacab.org/leap/bitmask-systray/bitmaskd"
)
+const (
+ notRunning = `Is bitmaskd running? Start bitmask and try again.`
+)
+
func initBitmask() (bitmask.Bitmask, error) {
- return bitmaskd.Init()
+ b, err := bitmaskd.Init()
+ if err != nil {
+ log.Printf("An error ocurred starting bitmaskd: %v", err)
+ err = errors.New(printer.Sprintf(notRunning))
+ }
+ return b, err
}
func newAutostart(appName string, iconPath string) autostart {