[gnome-books/wip/hadess/no-mobi-error] document: Don't throw an error in the logs loading Mobi
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-books/wip/hadess/no-mobi-error] document: Don't throw an error in the logs loading Mobi
- Date: Sat, 3 Aug 2019 15:21:36 +0000 (UTC)
commit 602f572d03c3c221f41be09bc75a7f28bbaab1be
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 0a0c6f7e..ba35fc44 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]