summaryrefslogtreecommitdiff
path: root/lib/sway/sway.vala
diff options
context:
space:
mode:
authornoname <[email protected]>2025-03-07 18:02:34 +1100
committernoname <[email protected]>2025-03-07 18:02:34 +1100
commit7bec8a8f9bd8b0e0fa9a9997b48463765dc79a47 (patch)
tree57e123460803ccdfd2b9f03933077b815ebfc29b /lib/sway/sway.vala
parent3bee9424f314814e38149a2f98c1ff010797be9e (diff)
improve error handling
Diffstat (limited to 'lib/sway/sway.vala')
-rw-r--r--lib/sway/sway.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sway/sway.vala b/lib/sway/sway.vala
index 8f7e6ba..8fdbb17 100644
--- a/lib/sway/sway.vala
+++ b/lib/sway/sway.vala
@@ -20,7 +20,7 @@ public class Sway : Object {
_instance = s;
return s;
} catch (Error err) {
- critical(err.message);
+ critical("could not initialize: %s", err.message);
return null;
}
@@ -164,7 +164,7 @@ public class Sway : Object {
}
}
- private async void subscribe() {
+ private async void subscribe() throws Error {
if (subscribe_socket != null) {
return;
}
@@ -173,7 +173,7 @@ public class Sway : Object {
ipc.send(subscribe_socket.output_stream, PayloadType.MESSAGE_SUBSCRIBE, "[ \"workspace\", \"window\" ]");
while (true) {
var result = yield ipc.receive_async(subscribe_socket.input_stream);
- handle_event(result);
+ yield handle_event(result);
}
}