Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A1A4B200B76 for ; Tue, 30 Aug 2016 23:20:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A0071160ABA; Tue, 30 Aug 2016 21:20:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E686E160AAF for ; Tue, 30 Aug 2016 23:20:08 +0200 (CEST) Received: (qmail 42018 invoked by uid 500); 30 Aug 2016 21:20:08 -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 42006 invoked by uid 99); 30 Aug 2016 21:20:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2016 21:20:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4B0E0186503 for ; Tue, 30 Aug 2016 21:20:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id japY96N1XZmt for ; Tue, 30 Aug 2016 21:20:03 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 57B555FB9B for ; Tue, 30 Aug 2016 21:20:03 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id c133so7384591wmd.1 for ; Tue, 30 Aug 2016 14:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=kLDGjHZfzE8z+GMLgeId/xzfa7V6r84Tpb97j+rFdOI=; b=tzUhVFOblapyZ2Efps/X40d1K7AjNixYs8SPMYShdbe1vSia7YmFeMRM21iT85tIzU CLUarIkWR9rEk0nc7JmuYjltW1JcGfNtAv9Grb5TpsuBBjlYa9w2kwyS6FD4pXu1ppg5 mwfqC0rB9C5PU14MFK0swAT6Km6N50oxvAfc8EWSUKgvqZ3IRGNV7+JM2HmnYKTvAs1H YVo6Dwh2yHdqLnT5D9wcE5TU+HVPaEn8DEFbUUBoTc9+Ocb4aSNUH57nosr7n6lHnmco aSuG0RwsmekMX/fLzJdVBUd/f3QR1O6Megu59I0flxyjm1o1TeaViCt6A/i9etq2cJhM EoKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=kLDGjHZfzE8z+GMLgeId/xzfa7V6r84Tpb97j+rFdOI=; b=hYbRdX2nIp0S2c4YlCYGhEYw9CNPESQ0ArFU7CrxcFIuXGFcolOz6Wf1zbkIl47hI2 mXALA+OLBXs3TzpRAkD9U2DFvSpy109bbEQxg9/JIWE89HYk7oPOpJNeUbef4sprZ++Q yYSlxCZv8bukloXmI03vxhLC8HFKFuPamsR8e6TZC0hTPsigZ+0+MaqCvMBHscy5SDlp jbeQs0UHXmJ0hq6lSuFQJ/XRlxSLOcL73Kb6Uc2Cpkw4dGfSKYsoPA7oP+AKmRWA2Foa KhV17AQ6XtGAvxHEIOr/NK34w6Jj8dL9F0wjCkd0hgVId31PfvLeJUhvE/JgembPAcZF Og3w== X-Gm-Message-State: AE9vXwOif9zjjXud2FgSGaybBt94zmZGn8cdPSjDVtAN0fU2Ksaj+W55T10Nqgd5OBw22AlKIBUOsxNt09GBRg== X-Received: by 10.28.152.66 with SMTP id a63mr17106985wme.66.1472592002125; Tue, 30 Aug 2016 14:20:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.46.208 with HTTP; Tue, 30 Aug 2016 14:20:00 -0700 (PDT) In-Reply-To: References: From: julio cesar sanchez Date: Tue, 30 Aug 2016 23:20:00 +0200 Message-ID: Subject: Re: Cordova bridge call exception console log does not include call stack information To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a114b41202f9c7c053b508b99 archived-at: Tue, 30 Aug 2016 21:20:09 -0000 --001a114b41202f9c7c053b508b99 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi. Can you create an issue on issues.cordova.io? El martes, 30 de agosto de 2016, Li, Jonathan escribi=C3=B3: > > Hi, > In cordova.js, callbackFromNative method, when handles the exception, it > only logs the callbackid and error message, but does not log the error > callstack. Usually the callstack is quite useful to find what causes the > exception, so just wonder what is the reason to not include it in the err= or > console log. > > If it is fine to include the call stack information in the console log, I > would like to submit a pull request for the change. > > > /** > * Called by native code when returning the result from an action. > */ > callbackFromNative: function(callbackId, isSuccess, status, args, > keepCallback) { > try { > var callback =3D cordova.callbacks[callbackId]; > if (callback) { > if (isSuccess && status =3D=3D cordova.callbackStatus.OK)= { > callback.success && callback.success.apply(null, args= ); > } else if (!isSuccess) { > callback.fail && callback.fail.apply(null, args); > } > /* > else > Note, this case is intentionally not caught. > this can happen if isSuccess is true, but > callbackStatus is NO_RESULT > which is used to remove a callback from the list > without calling the callbacks > typically keepCallback is false in this case > */ > // Clear callback if not expecting any more results > if (!keepCallback) { > delete cordova.callbacks[callbackId]; > } > } > } > catch (err) { > var msg =3D "Error in " + (isSuccess ? "Success" : "Error") += " > callbackId: " + callbackId + " : " + err; > console && console.log && console.log(msg); > cordova.fireWindowEvent("cordovacallbackerror", { 'message': > msg }); > throw err; > } > > Thanks > Jonathan > --001a114b41202f9c7c053b508b99--