[gnome-contacts] avatar-selector: Always log messages on error
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] avatar-selector: Always log messages on error
- Date: Mon, 30 Nov 2020 12:15:34 +0000 (UTC)
commit 2594315c1762f8bd1e406659220263ca9281fa83
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Nov 30 13:15:05 2020 +0100
avatar-selector: Always log messages on error
src/contacts-avatar-selector.vala | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/contacts-avatar-selector.vala b/src/contacts-avatar-selector.vala
index e44ddcd2..34dc4125 100644
--- a/src/contacts-avatar-selector.vala
+++ b/src/contacts-avatar-selector.vala
@@ -142,8 +142,8 @@ public class Contacts.AvatarSelector : Popover {
try {
var stream = details.avatar.load (MAIN_SIZE, null);
return create_thumbnail (new Gdk.Pixbuf.from_stream (stream));
- } catch {
- debug ("Couldn't create frame for persona \"%s\".", persona.display_id);
+ } catch (Error e) {
+ debug ("Couldn't create frame for persona '%s': %s", persona.display_id, e.message);
}
return null;
@@ -152,8 +152,8 @@ public class Contacts.AvatarSelector : Popover {
private FlowBoxChild? thumbnail_for_filename (string filename) {
try {
return create_thumbnail (new Gdk.Pixbuf.from_file (filename));
- } catch {
- debug ("Couldn't create frame for file \"%s\".", filename);
+ } catch (Error e) {
+ debug ("Couldn't create frame for file '%s': %s", filename, e.message);
}
return null;
@@ -256,9 +256,10 @@ public class Contacts.AvatarSelector : Popover {
var mime_type = file_info.get_content_type ();
if (mime_type != null)
- pixbuf = thumbnail_factory.generate_thumbnail (uri, mime_type);
+ pixbuf = this.thumbnail_factory.generate_thumbnail (uri, mime_type);
}
- } catch {
+ } catch (Error e) {
+ debug ("Couldn't generate thumbnail for file '%s': %s", uri, e.message);
}
if (chooser is Dialog)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]