mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Log only GError message
This commit is contained in:
parent
c9d58d4259
commit
5394717ddc
1 changed files with 15 additions and 8 deletions
|
@ -79,8 +79,9 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||||
|
|
||||||
if (!proxy) {
|
if (!proxy) {
|
||||||
if (done) {
|
if (done) {
|
||||||
|
Gio::DBusErrorNS_::strip_remote_error(proxy.error());
|
||||||
LOG(("Portal Autostart Error: %1").arg(
|
LOG(("Portal Autostart Error: %1").arg(
|
||||||
proxy.error().what()));
|
proxy.error().message_().c_str()));
|
||||||
done(false);
|
done(false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -117,8 +118,10 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||||
|
|
||||||
if (!requestProxy) {
|
if (!requestProxy) {
|
||||||
if (done) {
|
if (done) {
|
||||||
|
Gio::DBusErrorNS_::strip_remote_error(
|
||||||
|
requestProxy.error());
|
||||||
LOG(("Portal Autostart Error: %1").arg(
|
LOG(("Portal Autostart Error: %1").arg(
|
||||||
requestProxy.error().what()));
|
requestProxy.error().message_().c_str()));
|
||||||
done(false);
|
done(false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -192,8 +195,11 @@ void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
if (done) {
|
if (done) {
|
||||||
LOG(("Portal Autostart Error: %1")
|
const auto &error = result.error();
|
||||||
.arg(result.error().what()));
|
Gio::DBusErrorNS_::strip_remote_error(
|
||||||
|
error);
|
||||||
|
LOG(("Portal Autostart Error: %1").arg(
|
||||||
|
error.message_().c_str()));
|
||||||
done(false);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +253,7 @@ bool GenerateDesktopFile(
|
||||||
|
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
LOG(("App Error: %1").arg(loaded.error().what()));
|
LOG(("App Error: %1").arg(loaded.error().message_().c_str()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +263,8 @@ bool GenerateDesktopFile(
|
||||||
const auto removed = target.remove_group(group);
|
const auto removed = target.remove_group(group);
|
||||||
if (!removed) {
|
if (!removed) {
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
LOG(("App Error: %1").arg(removed.error().what()));
|
LOG(("App Error: %1").arg(
|
||||||
|
removed.error().message_().c_str()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +327,7 @@ bool GenerateDesktopFile(
|
||||||
const auto saved = target.save_to_file(targetFile.toStdString());
|
const auto saved = target.save_to_file(targetFile.toStdString());
|
||||||
if (!saved) {
|
if (!saved) {
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
LOG(("App Error: %1").arg(saved.error().what()));
|
LOG(("App Error: %1").arg(saved.error().message_().c_str()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -411,7 +418,7 @@ bool GenerateServiceFile(bool silent = false) {
|
||||||
const auto saved = target.save_to_file(targetFile.toStdString());
|
const auto saved = target.save_to_file(targetFile.toStdString());
|
||||||
if (!saved) {
|
if (!saved) {
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
LOG(("App Error: %1").arg(saved.error().what()));
|
LOG(("App Error: %1").arg(saved.error().message_().c_str()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue