Repository: cordova-cli Updated Branches: refs/heads/master 72008357b -> 6f7d314c3
CB-12683: fixed error handling Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/6f7d314c Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/6f7d314c Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/6f7d314c Branch: refs/heads/master Commit: 6f7d314c3dc423c1d1437ae5d7a7e81e0f0d7d01 Parents: 7200835 Author: Steve Gill <[email protected]> Authored: Fri Apr 21 14:09:06 2017 -0700 Committer: Steve Gill <[email protected]> Committed: Fri Apr 21 14:47:24 2017 -0700 ---------------------------------------------------------------------- src/cli.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6f7d314c/src/cli.js ---------------------------------------------------------------------- diff --git a/src/cli.js b/src/cli.js index 63b7763..184a801 100644 --- a/src/cli.js +++ b/src/cli.js @@ -275,10 +275,12 @@ function cli(inputArgs) { var args = nopt(knownOpts, shortHands, inputArgs); - // For CordovaError print only the message without stack trace unless we - // are in a verbose mode. process.on('uncaughtException', function(err) { - logger.error(err); + if(err.message) { + logger.error(err.message); + } else { + logger.error(err); + } // Don't send exception details, just send that it happened if(shouldCollectTelemetry) { telemetry.track('uncaughtException'); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
