cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Koudritsky" <kam...@gmail.com>
Subject Review Request 17064: Add a CordovaError exception class for better error reporting in CLI
Date Fri, 17 Jan 2014 19:36:30 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17064/
-----------------------------------------------------------

Review request for cordova.


Bugs: CB-5782
    https://issues.apache.org/jira/browse/CB-5782


Repository: cordova-cli


Description
-------

The on('uncaughtException') handler was removed recently in cordova-cli because
it was hiding the stack traces of some legit exceptions, but this results in
scary traces for simple errors like running outside a corodva project.

This change reintroduces the on('uncaughtException') handler and adds a special
CordovaError class for such simple errors. For exceptions of CordovaError class
only the message will be printed, for all other errors - the full stack trace.

Another pass over the code will be needed to find and convert the Errors to
CordovaErrors where appropriate. Will be done in a separate change.


Diffs
-----

  src/cli.js d22ba56 
  src/util.js 278172a 

Diff: https://reviews.apache.org/r/17064/diff/


Testing
-------

npm test
cordova plugin ls (inside and outside a a proj)
cordova bad_command


Thanks,

Mark Koudritsky


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message