[grilo/0.2.x] net: Better error message when a mock file is absent
- From: Juan A. Suárez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/0.2.x] net: Better error message when a mock file is absent
- Date: Sat, 19 Dec 2015 11:27:00 +0000 (UTC)
commit 2c85bf304ae04dc8b63772c0c57673f7231a3c69
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 16 14:13:10 2015 +0100
net: Better error message when a mock file is absent
Now we'll print the path of the missing file, instead of a glib message
about it.
libs/net/grl-net-mock.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libs/net/grl-net-mock.c b/libs/net/grl-net-mock.c
index ce9c367..0aebceb 100644
--- a/libs/net/grl-net-mock.c
+++ b/libs/net/grl-net-mock.c
@@ -106,16 +106,15 @@ get_url_mocked (GrlNetWc *self,
if (data_file[0] != '/') {
full_path = g_build_filename (base_path, data_file, NULL);
} else {
- full_path = data_file;
- data_file = NULL;
+ full_path = g_strdup (data_file);
}
if (g_stat (full_path, &stat_buf) < 0) {
g_simple_async_result_set_error (G_SIMPLE_ASYNC_RESULT (result),
GRL_NET_WC_ERROR,
GRL_NET_WC_ERROR_NOT_FOUND,
- "%s",
- _("Could not access mock content"));
+ _("Could not access mock content: %s"),
+ data_file);
g_simple_async_result_complete_in_idle (G_SIMPLE_ASYNC_RESULT (result));
g_object_unref (result);
g_free (new_url);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]