[
https://issues.apache.org/jira/browse/CB-5572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Grieve resolved CB-5572.
-------------------------------
Resolution: Invalid
[~lorin.beer] Not sure what the bug is here. Could you re-open with some repro
steps?
> exceptions occurring in the cli are not bubbled to the catch of the promise
> (in project consuming the CLI as a library)
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: CB-5572
> URL: https://issues.apache.org/jira/browse/CB-5572
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI
> Reporter: Lorin Beer
>
> the promise library used by the Cordova CLI (https://npmjs.org/package/q) has
> a spec which includes a catch function.
> useable like this:
> Q.func(promisedstep1)
> .then(promisedstep2)
> ...
> .catch(function(error){
> ...
> });
> use of this syntax
> steps to replicate:
> execute
> cordova.raw.platform.supports('.', "<platform>").then(function(){
> ...
> }).catch(function (e) {
> console.log(e);
> });
> in a project which requires cordova, but on a system where <platform> sdk is
> not present or inaccessible to the cli.
> the result is that any errors in the Cordova CLI are not caught by the
> promised catch, but instead cause the process consuming the cli to error out.
--
This message was sent by Atlassian JIRA
(v6.2#6252)