Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87479 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52410 invoked from network); 1 Aug 2015 05:32:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2015 05:32:56 -0000 Authentication-Results: pb1.pair.com header.from=me@stephencoakley.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@stephencoakley.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stephencoakley.com from 65.175.74.117 cause and error) X-PHP-List-Original-Sender: me@stephencoakley.com X-Host-Fingerprint: 65.175.74.117 mail12.ezhostingserver.com Received: from [65.175.74.117] ([65.175.74.117:55260] helo=mail12.ezhostingserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/B0-41796-70A5CB55 for ; Sat, 01 Aug 2015 01:32:55 -0400 Received: from [192.168.1.123] (68-118-157-39.dhcp.mdsn.wi.charter.com [68.118.157.39]) by mail12.hostek.com with SMTP (version=Tls cipher=Aes256 bits=256); Sat, 1 Aug 2015 00:32:30 -0500 Message-ID: <55BC59EE.6080401@stephencoakley.com> Date: Sat, 01 Aug 2015 00:32:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Stanislav Malyshev , internals@lists.php.net References: <550FA2ED.6080000@gmail.com> <55B7B08E.7070700@gmail.com> <55B7EA22.7060504@gmail.com> <63.12.24609.047DBB55@pb1.pair.com> <55BBFE9B.6030904@gmail.com> In-Reply-To: <55BBFE9B.6030904@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Serializing exceptions From: me@stephencoakley.com (Stephen Coakley) > Hi! > >> week or two and I serialize exceptions (excluding stack trace arguments) >> to send them back to the calling process to aid in debugging process >> failures. > > But then you don't need to serialize Exception. You need to send the > text representation of Exception, for humans to look at, not the live > Exception object. Sending the actual object would be next to impossible > anyway (i.e. how you send over the live DB connection on DB query > exception?). > But the text representation includes the exception message, code, and the stack trace. That's pretty much the whole thing. But you are right, I don't want (and couldn't transfer) the live objects related to the stack trace, if that's what you're referring to. That's why I would omit the arguments in each stack trace item during serialization, because who knows what it could be. I just think that serializing exceptions is a buggy feature right now, and we should fix the feature instead of throwing it out. -- Stephen Coakley