Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44399 invoked from network); 23 Mar 2015 05:21:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Mar 2015 05:21:56 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.48 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.48 mail-pa0-f48.google.com Received: from [209.85.220.48] ([209.85.220.48:32930] helo=mail-pa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/00-44294-3F2AF055 for ; Mon, 23 Mar 2015 00:21:56 -0500 Received: by pabxg6 with SMTP id xg6so167285925pab.0 for ; Sun, 22 Mar 2015 22:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=WaEiSsWz9wmQhnH2zme3LoNbhjbmbNCZF0PI36oJhSQ=; b=v+DQkdH4BpWo0EcGFMaub/YSLj7FESLa+WEzdhwxuyj/mUCqXsraBaxMWHT8tSvvRx V5Rtk+e2whpxAKf617n23bwt+YVj+0Vno7mB49mieXCWrpibZ4Y+NDiLGApp6ymuz9LL 77IX3tIauQAuvvBk7E3agPCTs/hzYBPU85moN1HGlzb1XSuYYA08kSnH4yiVd6g1t3ob fxvK2I+vKAKeYPxBZhddw7AU/CKMPILH1L+eshoynyBCL6p1otXsVFbuBDxLRPB0pl9v JCxFUQlos636k4eqQm4y/dDKocNYMTKQ/pvjw0t+d4I75x3Vzu5OVh/NQWi7C3x1n+3a rMyw== X-Received: by 10.68.228.100 with SMTP id sh4mr17598916pbc.110.1427088111130; Sun, 22 Mar 2015 22:21:51 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id os6sm15583196pac.28.2015.03.22.22.21.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Mar 2015 22:21:50 -0700 (PDT) Message-ID: <550FA2ED.6080000@gmail.com> Date: Sun, 22 Mar 2015 22:21:49 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Serializing exceptions From: smalyshev@gmail.com (Stanislav Malyshev) Hi! Looking into some issue, I've discovered that, to my surprise, Exceptions are serializable. Except that it doesn't always work of course (e.g. see http://stackoverflow.com/q/9747813/214196) because exceptions contain backtraces, and those can contain non-serializable objects. So in reality, you never know if you can serialize it or not. So, I wonder - would it be ok to make exceptions not serializable at all? I think that would prevent major WTF factor when people try it and it randomly fails. Thoughts? -- Stas Malyshev smalyshev@gmail.com