cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [04/10] git commit: CB-5614 Include path to file when config.xml fails to parse
Date Tue, 10 Dec 2013 18:47:04 GMT
CB-5614 Include path to file when config.xml fails to parse

https://github.com/apache/cordova-cli/pull/108


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/6d241ffb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/6d241ffb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/6d241ffb

Branch: refs/heads/master
Commit: 6d241ffb21ef3e6cbe01492bf2a41c2d33c0e8c6
Parents: 0779679
Author: Josh Soref <jsoref@blackberry.com>
Authored: Mon Dec 9 15:57:25 2013 -0500
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Tue Dec 10 10:44:31 2013 -0800

----------------------------------------------------------------------
 src/config_parser.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6d241ffb/src/config_parser.js
----------------------------------------------------------------------
diff --git a/src/config_parser.js b/src/config_parser.js
index 2a506f9..b6293d8 100644
--- a/src/config_parser.js
+++ b/src/config_parser.js
@@ -22,7 +22,11 @@ var et = require('elementtree'),
 
 function config_parser(path) {
     this.path = path;
-    this.doc = xml.parseElementtreeSync(path);
+    try {
+        this.doc = xml.parseElementtreeSync(path);
+    } catch (e) {
+        throw new Error("Parsing "+path+" failed:\n"+e.message);
+    }
     this.access = new access(this);
     this.preference = new preference(this);
 }


Mime
View raw message