[gnome-books/wip/hadess/no-mobi-error: 3/3] document: Don't throw an error in the logs loading Mobi



commit 7aee894c782d175b341c5b74867d424c68e30aec
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Aug 3 17:20:25 2019 +0200

    document: Don't throw an error in the logs loading Mobi
    
    Mobi files aren't supported, but there's really no need to throw a GJS
    error in the logs for that, we're already telling the user.

 src/documents.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/documents.js b/src/documents.js
index 3279a9f9..f419ba6a 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -1089,7 +1089,8 @@ var DocumentManager = new Lang.Class({
             return;
         }
 
-        if (!error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
+        if (!error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
+            !error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED))
             logError(error, 'Unable to load document');
         else
             Utils.debug('Unable to load document' + doc.uri);


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