[gnome-sound-recorder/35-remove-conditional-catch-statements] Remove usage of conditional catch statements



commit 455ba5f9e327b6d9495b1fd7dc5dd0a6bd95ae99
Author: Tim Lunn <tim feathertop org>
Date:   Mon Sep 10 18:02:03 2018 +1000

    Remove usage of conditional catch statements
    
    The are no longer supported in mozjs60
    
    Closes https://gitlab.gnome.org/GNOME/gnome-sound-recorder/issues/35

 src/listview.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/listview.js b/src/listview.js
index 33cbec0..afe508a 100644
--- a/src/listview.js
+++ b/src/listview.js
@@ -111,7 +111,10 @@ const Listview = new Lang.Class({
                                     if (returnedNumber > trackNumber)
                                         trackNumber = returnedNumber;
 
-                                }  catch (e if e instanceof TypeError) {
+                                }  catch (e) {
+                                    if (!e instanceof TypeError)
+                                        throw e;
+
                                     log("Tracknumber not returned");
                                     // Don't handle the error
                                 }


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