[gnome-desktop] thumbnail: And print those errors in the debug



commit f96041679f46ece036d742bde7d78afc67d73519
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Aug 8 19:20:31 2017 +0200

    thumbnail: And print those errors in the debug
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785963

 libgnome-desktop/gnome-desktop-thumbnail.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 73751f6..866fc7d 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -1066,13 +1066,20 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
   if (script)
     {
       GBytes *data;
+      GError *error = NULL;
 
-      data = gnome_desktop_thumbnail_script_exec (script, size, uri, NULL);
+      data = gnome_desktop_thumbnail_script_exec (script, size, uri, &error);
       if (data)
         {
           pixbuf = pixbuf_new_from_bytes (data, NULL);
           g_bytes_unref (data);
         }
+      else
+        {
+          g_debug ("Thumbnail script ('%s') failed for '%s': %s",
+                   script, uri, error ? error->message : "no details");
+          g_clear_error (&error);
+        }
     }
 
   g_free (script);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]