cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Koudritsky" <kam...@gmail.com>
Subject Re: Review Request 17064: Add a CordovaError exception class for better error reporting in CLI
Date Mon, 20 Jan 2014 22:07:49 GMT

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

(Updated Jan. 20, 2014, 10:07 p.m.)


Review request for cordova.


Changes
-------

Style fix: removed the space after paren in "if".


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 (updated)
-----

  src/CordovaError.js PRE-CREATION 
  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