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 E703C101AB for ; Mon, 20 Jan 2014 21:23:40 +0000 (UTC) Received: (qmail 58947 invoked by uid 500); 20 Jan 2014 21:23:40 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 58914 invoked by uid 500); 20 Jan 2014 21:23:40 -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 58902 invoked by uid 99); 20 Jan 2014 21:23:39 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 21:23:39 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id C12C71D44E7; Mon, 20 Jan 2014 21:23:38 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6459311049753992839==" MIME-Version: 1.0 Subject: Re: Review Request 17064: Add a CordovaError exception class for better error reporting in CLI From: "Mark Koudritsky" To: "Mark Koudritsky" , "Andrew Grieve" , "cordova" , "Michal Mocny" Date: Mon, 20 Jan 2014 21:23:38 -0000 Message-ID: <20140120212338.4982.86677@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" References: <20140117193630.15506.70727@reviews.apache.org> In-Reply-To: <20140117193630.15506.70727@reviews.apache.org> Reply-To: "Mark Koudritsky" X-ReviewRequest-Repository: cordova-cli --===============6459311049753992839== 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/ ----------------------------------------------------------- (Updated Jan. 20, 2014, 9:23 p.m.) Review request for cordova. Changes ------- - Move CordovaError to CordovaError.js - Move prototype assignment outside of the constructor. 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 --===============6459311049753992839==--