You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/10 02:40:47 UTC

git commit: CB-5614 Include path to file when config.xml fails to parse

Updated Branches:
  refs/heads/master fe2f04bcb -> 02d2d641e


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/02d2d641
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/02d2d641
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/02d2d641

Branch: refs/heads/master
Commit: 02d2d641ebe26b12c4f3e062e5864ee2254ab963
Parents: fe2f04b
Author: Josh Soref <js...@blackberry.com>
Authored: Mon Dec 9 15:57:25 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Dec 9 20:40:30 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/02d2d641/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);
 }