cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: CB-5614 Include path to file when config.xml fails to parse
Date Tue, 10 Dec 2013 01:40:47 GMT
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 <jsoref@blackberry.com>
Authored: Mon Dec 9 15:57:25 2013 -0500
Committer: Andrew Grieve <agrieve@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);
 }


Mime
View raw message