Re: Re: Serializing exceptions
| From: | Rowan Collins | Date: | Tue, 28 Jul 2015 15:50:04 +0000 |
| Subject: | Re: Re: Serializing exceptions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87344@lists.php.net to get a copy of this message | ||
Nikita Popov wrote on 28/07/2015 14:07:
-1 on this. If there is no technical problem with serializing the Exception class itself, it should be possible to serialize it. It can always happen that an object contains some not-serializable member, this is nothing specific to exceptions. I don't see the point of this change. Also, Christian Stoller's mail pointed out that Symfony uses serialized exceptions.The problem is that exceptions *unpredictably* contain non-serializable members, because it depends on what's happened at arbitrary points in the backtrace. There is nothing a user catching an exception can do to predict or prevent it happening, unless (as I have repeatedly suggested) there is some way to strip the 'args' from the backtrace items.