Strip notification service start error

This commit is contained in:
Ilya Fedin 2024-04-01 09:44:53 +04:00 committed by John Preston
parent 1b589a35cf
commit e07d53725c

View file

@ -100,14 +100,15 @@ void StartServiceAsync(Gio::DBusConnection connection, Fn<void()> callback) {
Core::Sandbox::Instance().customEnterFromEventLoop([&] { Core::Sandbox::Instance().customEnterFromEventLoop([&] {
// get the error if any // get the error if any
if (const auto ret = result(); !ret) { if (const auto ret = result(); !ret) {
const auto error = static_cast<GLib::Error*>( const auto &error = *static_cast<GLib::Error*>(
ret.error().get()); ret.error().get());
if (error->gobj_()->domain != G_DBUS_ERROR if (error.gobj_()->domain != G_DBUS_ERROR
|| error->code_() || error.code_()
!= G_DBUS_ERROR_SERVICE_UNKNOWN) { != G_DBUS_ERROR_SERVICE_UNKNOWN) {
Gio::DBusErrorNS_::strip_remote_error(error);
LOG(("Native Notification Error: %1").arg( LOG(("Native Notification Error: %1").arg(
error->what())); error.message_().c_str()));
} }
} }