You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/06/10 19:54:44 UTC
git commit: better handling of stack traces in uncaught exceptions in
cli shim. if verbose mode is on, dump out full stack trace,
otherwise just show the error.
Updated Branches:
refs/heads/master2 1ee6a36f5 -> d30ffea0a
better handling of stack traces in uncaught exceptions in cli shim. if verbose mode is on, dump out full stack trace, otherwise just show the error.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/d30ffea0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/d30ffea0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/d30ffea0
Branch: refs/heads/master2
Commit: d30ffea0a37a0eea27cc4857302a54f2a08056bc
Parents: 1ee6a36
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Jun 10 10:54:38 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Jun 10 10:54:38 2013 -0700
----------------------------------------------------------------------
bin/cordova | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d30ffea0/bin/cordova
----------------------------------------------------------------------
diff --git a/bin/cordova b/bin/cordova
index 60b2e09..0cd116d 100755
--- a/bin/cordova
+++ b/bin/cordova
@@ -16,14 +16,17 @@ while (current = tokens.shift()) {
// provide clean output on exceptions rather than dumping a stack trace
process.on('uncaughtException', function(err){
- console.error(err);
+ if (verbose) {
+ console.error(err.stack);
+ } else {
+ console.error(err);
+ }
process.exit(1);
});
cordova.on('result', console.log);
if (verbose) {
cordova.on('log', console.log);
cordova.on('warn', console.warn);
- process.on('uncaughtException', function(err) { console.error(err.stack) });
}
if (version) {