cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-cli git commit: CB-12683: fixed error handling
Date Fri, 21 Apr 2017 21:48:00 GMT
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 <stevengill97@gmail.com>
Authored: Fri Apr 21 14:09:06 2017 -0700
Committer: Steve Gill <stevengill97@gmail.com>
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: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message