[bugzilla-gnome-org-extensions] 4.4 migration: Display an error for invalid patch



commit 33ddda801d9e1f793f46e05690721c984b63f616
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Nov 18 21:43:52 2014 +0100

    4.4 migration: Display an error for invalid patch

 web/splinter.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/web/splinter.js b/web/splinter.js
index 40b464a..7a5b87a 100644
--- a/web/splinter.js
+++ b/web/splinter.js
@@ -2677,7 +2677,13 @@ function init() {
                    data: {
                        id: attachmentId
                    },
-                   success: gotAttachment,
+                   success: function(text) {
+                       try {
+                           gotAttachment(text)
+                       } catch (e) {
+                           displayError("Failed to parse attachment " + attachmentId + ": " + e);
+                       }
+                   },
                    error: function(a, b, c) {
                        displayError("Failed to retrieve attachment " + attachmentId);
                    }


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