couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject git commit: COUCH-1470 - added error handling for opening missing document in futon. Also made all js alert error messages have the same format.
Date Sat, 16 Jun 2012 11:35:14 GMT
Updated Branches:
  refs/heads/master 8979e5eed -> 5da40eef7


COUCH-1470 - added error handling for opening missing document in futon.
Also made all js alert error messages have the same format.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5da40eef
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5da40eef
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5da40eef

Branch: refs/heads/master
Commit: 5da40eef7e8b33a99de957085ddf1c3b09062935
Parents: 8979e5e
Author: Anthony S Baker <anthony.s.baker@gmail.com>
Authored: Fri May 11 16:23:30 2012 -0400
Committer: Jan Lehnardt <jan@apache.org>
Committed: Sat Jun 16 13:31:00 2012 +0200

----------------------------------------------------------------------
 THANKS                           |    1 +
 share/www/script/futon.browse.js |   13 ++++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5da40eef/THANKS
----------------------------------------------------------------------
diff --git a/THANKS b/THANKS
index 0834f98..5a51abc 100644
--- a/THANKS
+++ b/THANKS
@@ -97,6 +97,7 @@ suggesting improvements or submitting changes. Some of these people are:
  * Alexander Dorofeev <aka.spin@gmail.com>
  * Anthony S Baker <anthony.s.baker@gmail.com>
  * Ewan McDougall <info@mrloop.com>
+ * Anthony S Baker <anthony.s.baker@gmail.com>
 
 For a list of authors see the `AUTHORS` file.
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5da40eef/share/www/script/futon.browse.js
----------------------------------------------------------------------
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
index e291960..bbb29b3 100644
--- a/share/www/script/futon.browse.js
+++ b/share/www/script/futon.browse.js
@@ -570,15 +570,15 @@
                       "/" + $.couch.encodeDocId(doc._id) +
                       "/_view/" + encodeURIComponent(data.name);
                   },
-                  error: function(status, e, reason) {
-                    alert(reason);
+                  error: function(status, error, reason) {
+                    alert("Error: " + error + "\n\n" + reason);
                   }
                 });
               }
               db.openDoc(docId, {
                 error: function(status, error, reason) {
                   if (status == 404) save(null);
-                  else alert(reason);
+                  else alert("Error: " + error + "\n\n" + reason);
                 },
                 success: function(doc) {
                   save(doc);
@@ -616,8 +616,8 @@
                 $("#viewcode button.revert, #viewcode button.save")
                   .attr("disabled", "disabled");
               },
-              error: function(status, e, reason) {
-                alert(reason);
+              error: function(status, error, reason) {
+                alert("Error: " + error + "\n\n" + reason);
               }
             });
           }
@@ -1009,6 +1009,9 @@
 
         if (!page.isNew) {
           db.openDoc(docId, {revs_info: true,
+            error: function(status, error, reason) {
+              alert("Error: " + error + "\n\n" + reason);
+            },
             success: function(doc) {
               var revs = doc._revs_info || [];
               delete doc._revs_info;


Mime
View raw message