commit b15e3d2e3e577a253452ada8d42b9693d8691bd8
parent 4e17f1290c9c07f8a7e91662295dc84f21f6cbae
Author: hhvn <dev@hhvn.uk>
Date: Wed, 21 Feb 2024 18:35:26 +0000
Actual handle bar errors again
Diffstat:
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/main.go b/main.go
@@ -31,8 +31,11 @@ func main() {
defer bspc.Cleanup()
state := <- bspc.NewState
+
for _, m := range state.Monitors {
- Create(state, m.ID)
+ if err := Create(state, m.ID); err != nil {
+ common.Error("%s\n", err)
+ }
}
var blocks []*status.Block = nil
@@ -70,10 +73,18 @@ func main() {
case "monitor_add":
fallthrough
case "monitor_geometry":
- Create(state, id)
+ err = Create(state, id)
+ if err != nil {
+ common.Error("%s\n", err)
+ }
case "monitor_remove":
- Destroy(state, id)
+ err = Destroy(state, id)
+ if err != nil {
+ common.Error("%s\n", err)
+ }
}
+ } else {
+ common.Perror("Intify", err)
}
}
case err := <-bspc.StErr: