Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7AFF21034D for ; Fri, 17 Jan 2014 19:36:33 +0000 (UTC) Received: (qmail 86419 invoked by uid 500); 17 Jan 2014 19:36:33 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 86381 invoked by uid 500); 17 Jan 2014 19:36:32 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 86372 invoked by uid 99); 17 Jan 2014 19:36:32 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 19:36:32 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 67D8E1D446A; Fri, 17 Jan 2014 19:36:31 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9166834698769629684==" MIME-Version: 1.0 Subject: Review Request 17064: Add a CordovaError exception class for better error reporting in CLI From: "Mark Koudritsky" To: "Mark Koudritsky" , "cordova" Date: Fri, 17 Jan 2014 19:36:30 -0000 Message-ID: <20140117193630.15506.70727@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Mark Koudritsky" X-ReviewGroup: cordova X-ReviewRequest-URL: https://reviews.apache.org/r/17064/ X-Sender: "Mark Koudritsky" Reply-To: "Mark Koudritsky" X-ReviewRequest-Repository: cordova-cli --===============9166834698769629684== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 --===============9166834698769629684==--