couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [4/4] git commit: updated refs/heads/master to df23be9
Date Tue, 04 Jun 2013 13:47:00 GMT
Fauxton wrap codemirror errors in try catch.


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

Branch: refs/heads/master
Commit: df23be9339140dd0631db2f9a42c31587e78b3f3
Parents: c984ead
Author: Garren Smith <garren.smith@gmail.com>
Authored: Tue Jun 4 15:13:32 2013 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Jun 4 15:46:39 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/df23be93/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index f8c7447..93f06f1 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -477,8 +477,11 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint) {
         matchBrackets: true,
         lineWrapping: true,
         onChange: function() {
-          //throwing errors at the moment
-          //that.runJSHint();
+          try {
+            that.runJSHint();
+          } catch (e) {
+            console.log('ERROR for jshint',e);
+          }
         },
         extraKeys: {
           "Ctrl-S": function(instance) { that.saveDoc(); },
@@ -950,7 +953,11 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint) {
         matchBrackets: true,
         lineWrapping: true,
         onChange: function() {
-          //that.runJSHint("mapEditor");
+          try {
+            that.runJSHint("mapEditor");
+          } catch (e) {
+            console.log('ERROR for jshint',e);
+          }
         },
         extraKeys: {
           "Ctrl-S": function(instance) { that.saveView(); },
@@ -963,7 +970,11 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint) {
         matchBrackets: true,
         lineWrapping: true,
         onChange: function() {
-          //that.runJSHint("reduceEditor");
+          try {
+            that.runJSHint("reduceEditor");
+          } catch (e) {
+            console.log('ERROR for jshint',e);
+          }
         },
         extraKeys: {
           "Ctrl-S": function(instance) { that.saveView(); },


Mime
View raw message