[gnome-terminal/gsettings] client: Give better error messages
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/gsettings] client: Give better error messages
- Date: Mon, 16 Apr 2012 13:11:35 +0000 (UTC)
commit 55f66454a828a271bd45c1ae80ccc0cab879897a
Author: Christian Persch <chpe gnome org>
Date: Mon Apr 16 15:09:35 2012 +0200
client: Give better error messages
Strip remote errors first.
https://bugzilla.gnome.org/show_bug.cgi?id=655126
src/client.c | 4 ++++
src/terminal.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/client.c b/src/client.c
index 4595515..1fde9fc 100644
--- a/src/client.c
+++ b/src/client.c
@@ -633,6 +633,7 @@ handle_open (int *argc,
NULL /* cancellable */,
&error);
if (factory == NULL) {
+ g_dbus_error_strip_remote_error (error);
_printerr ("Error constructing proxy for %s:%s: %s\n",
TERMINAL_UNIQUE_NAME, TERMINAL_FACTORY_OBJECT_PATH,
error->message);
@@ -647,6 +648,7 @@ handle_open (int *argc,
&object_path,
NULL /* cancellable */,
&error)) {
+ g_dbus_error_strip_remote_error (error);
_printerr ("Error creating terminal: %s\n", error->message);
g_error_free (error);
g_object_unref (factory);
@@ -664,6 +666,7 @@ handle_open (int *argc,
NULL /* cancellable */,
&error);
if (receiver == NULL) {
+ g_dbus_error_strip_remote_error (error);
_printerr ("Failed to create proxy for terminal: %s\n", error->message);
g_error_free (error);
g_free (object_path);
@@ -681,6 +684,7 @@ handle_open (int *argc,
NULL, /* outfdlist */
NULL /* cancellable */,
&error)) {
+ g_dbus_error_strip_remote_error (error);
_printerr ("Error: %s\n", error->message);
g_error_free (error);
g_clear_object (fd_list);
diff --git a/src/terminal.c b/src/terminal.c
index bad5bd1..f2c78a3 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -233,6 +233,7 @@ main (int argc, char **argv)
NULL /* cancellable */,
&error);
if (factory == NULL) {
+ g_dbus_error_strip_remote_error (error);
g_printerr ("Error constructing proxy for %s:%s: %s\n",
options->server_bus_name ? options->server_bus_name : TERMINAL_UNIQUE_NAME,
TERMINAL_FACTORY_OBJECT_PATH,
@@ -242,6 +243,7 @@ main (int argc, char **argv)
}
if (!handle_options (factory, options, &error)) {
+ g_dbus_error_strip_remote_error (error);
g_printerr ("Failed to handle arguments: %s\n", error->message);
} else {
exit_code = EXIT_SUCCESS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]