Commit Graph

3 Commits

Author SHA1 Message Date
Florian Müllner
f38e3f4b5d notificationDaemon: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain
and return appropriate GLib.Errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
8f03eec3a3 endSessionDialog: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain
and return appropriate GLib.Errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
ca0ee2ae90 dbusErrors: Add utility module for handling remote errors
We sometimes return custom D-Bus errors. Right now those errors
are ad-hoc, which means receivers don't have a proper way of
checking whether a thrown GLib.Error corresponds to a particular
remote error.

In order to change that, we should define proper error enums and
domains, and register them with GDBus, so that there is an automatic
mapping between D-Bus errors and GLib.Errors.

The new module doesn't export any domains or enums yet, but provides
internal tooling to make these exports more convenient.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00