Re: Serializing exceptions
| From: | Pierre Joye | Date: | Mon, 23 Mar 2015 05:57:13 +0000 |
| Subject: | Re: Serializing exceptions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85418@lists.php.net to get a copy of this message | ||
On Mon, Mar 23, 2015 at 12:31 PM, Juan Basso <jrbasso@gmail.com> wrote:
> Maybe you can implement the __sleep method and just return the documented
> attributes (message, code, file, line).
>
> Not perfect, but probably more useful than throw an exception, specially if
> the exception is something that is the attribute of some object that is
> being serialized.
Well, can someone explain me why some code would need to serialize
exception in the 1st place?
Cheers,
--
Pierre
@pierrejoye | http://www.libgd.org