summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2013-06-04 15:13:32 +0200
committerGarren Smith <garren.smith@gmail.com>2013-06-04 15:46:39 +0200
commitdf23be9339140dd0631db2f9a42c31587e78b3f3 (patch)
tree829efc35b4c2c072fd923d4036fd4e06c556a2e9
parentc984eadde8e93dd8d693d65b0575035a55d177f8 (diff)
downloadcouchdb-df23be9339140dd0631db2f9a42c31587e78b3f3.tar.gz
Fauxton wrap codemirror errors in try catch.
-rw-r--r--src/fauxton/app/modules/documents/views.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index f8c744728..93f06f1db 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(); },