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 A4D72C2D8 for ; Wed, 19 Jun 2013 21:19:58 +0000 (UTC) Received: (qmail 14792 invoked by uid 500); 19 Jun 2013 21:19:58 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 14749 invoked by uid 500); 19 Jun 2013 21:19:58 -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 14725 invoked by uid 99); 19 Jun 2013 21:19:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jun 2013 21:19:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4108425DC5; Wed, 19 Jun 2013 21:19:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: filmaj@apache.org To: commits@cordova.apache.org Date: Wed, 19 Jun 2013 21:19:58 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] js commit: more robust error handling. Updated Branches: refs/heads/master 0f10e3a20 -> 1fd26e16e more robust error handling. Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/a945b9d5 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/a945b9d5 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/a945b9d5 Branch: refs/heads/master Commit: a945b9d5cc8446a7acdf861ec46c4a89cd2fbac2 Parents: bd4cff0 Author: Jesse MacFadyen Authored: Tue May 21 18:14:57 2013 -0700 Committer: Fil Maj Committed: Wed Jun 19 13:32:07 2013 -0700 ---------------------------------------------------------------------- lib/scripts/plugin_loader.js | 85 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/a945b9d5/lib/scripts/plugin_loader.js ---------------------------------------------------------------------- diff --git a/lib/scripts/plugin_loader.js b/lib/scripts/plugin_loader.js index 1a38eda..b56f124 100644 --- a/lib/scripts/plugin_loader.js +++ b/lib/scripts/plugin_loader.js @@ -34,11 +34,21 @@ } } + function scriptErrorCallback(err) { + // Open Question: If a script path specified in cordova_plugins.js does not exist, do we fail for all? + // this is currently just continuing. + scriptCounter--; + if (scriptCounter === 0) { + onScriptLoadingComplete && onScriptLoadingComplete(); + } + } + // Helper function to inject a