Re: Re: Serializing exceptions

From: Date: Fri, 31 Jul 2015 19:21:21 +0000
Subject: Re: Re: Serializing exceptions
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87450@lists.php.net to get a copy of this message
On Tue, Jul 28, 2015 at 6:40 PM, Stanislav Malyshev <smalyshev@gmail.com> wrote: > Hi! > > > -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.. > > The point is exactly that Exception contains non-serializable members > that makes successfully serializing and restoring them impossible. You > could get back something that looks like an Exception, but not the > original one - namely, you can not store and restore backtraces. > > Personally I feel the restoring them impossible argument weak, consider that we allow stuff like serializing resources without even a notice. Based on my own experiences where I had to fix multiple apps when we introduced the unserializable Closure (mostly error logger and debugging tools) which got passed as argument in the backtrace I would prefer if we could remove that restriction. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#87450) next »