Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E4AE105EF for ; Tue, 10 Dec 2013 01:40:48 +0000 (UTC) Received: (qmail 81431 invoked by uid 500); 10 Dec 2013 01:40:48 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 81384 invoked by uid 500); 10 Dec 2013 01:40:47 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 81377 invoked by uid 99); 10 Dec 2013 01:40:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Dec 2013 01:40:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AAC778B1F1C; Tue, 10 Dec 2013 01:40:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Message-Id: <0884d3ac8f14484eb36f3b368549bf7d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: CB-5614 Include path to file when config.xml fails to parse Date: Tue, 10 Dec 2013 01:40:47 +0000 (UTC) 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 Authored: Mon Dec 9 15:57:25 2013 -0500 Committer: Andrew Grieve 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); }