[gnome-documents/19-remove-conditional-catch-statements] Remove usage of conditional catch statements
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/19-remove-conditional-catch-statements] Remove usage of conditional catch statements
- Date: Wed, 12 Sep 2018 11:54:13 +0000 (UTC)
commit defa67f8ce4a01cffba5d1a17d2333bbfb3bb2aa
Author: Tim Lunn <tim feathertop org>
Date: Mon Sep 10 17:51:20 2018 +1000
Remove usage of conditional catch statements
These are no longer supported in mosjs60
Closes: https://gitlab.gnome.org/GNOME/gnome-documents/merge_requests/6
src/evinceview.js | 5 +++--
src/places.js | 1 -
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/evinceview.js b/src/evinceview.js
index 60c314c5..4d077f69 100644
--- a/src/evinceview.js
+++ b/src/evinceview.js
@@ -315,9 +315,10 @@ var EvinceView = new Lang.Class({
// the following invocation to work.
let evDoc = this._model.get_document();
evDoc.find_text();
- } catch (e if e instanceof TypeError) {
- canFind = false;
} catch (e) {
+ if (e instanceof TypeError) {
+ canFind = false;
+ }
}
this.getAction('find').enabled = (this.hasPages && canFind);
diff --git a/src/places.js b/src/places.js
index 220cd311..0bebbde0 100644
--- a/src/places.js
+++ b/src/places.js
@@ -60,7 +60,6 @@ var PlacesDialog = new Lang.Class({
// This is a hack to find out if evDoc implements the
// EvDocument.DocumentLinks interface or not.
docHasLinks = evDoc.has_document_links();
- } catch (e if e instanceof TypeError) {
} catch (e) {
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]