[gnome-documents/gnome-3-22] documents: Use logError to report loading failures



commit 9bef08367427a2f926cd6bd2ed2ab922aa06fc4f
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Mar 30 17:32:31 2017 +0200

    documents: Use logError to report loading failures
    
    Even though a brief summary of the error is presented via the UI, it is
    still useful to log the full backtrace. Loading a document can involve
    multiple I/O operations that are prone to failure, so having some more
    context is helpful for debugging.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774937

 src/documents.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 50cfbda..f860f8a 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -1356,6 +1356,8 @@ const DocumentManager = new Lang.Class({
             return;
         }
 
+        logError(error, 'Unable to load document');
+
         // Translators: %s is the title of a document
         let message = _("Oops! Unable to load ā€œ%sā€").format(doc.name);
         let exception = this._humanizeError(error);


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