RE: [PHP-DEV] Serializing exceptions
| From: | Christian Stoller | Date: | Mon, 23 Mar 2015 07:41:36 +0000 |
| Subject: | RE: [PHP-DEV] Serializing exceptions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85423@lists.php.net to get a copy of this message | ||
From: Stanislav Malyshev [mailto:smalyshev@gmail.com], Sent: Monday, March 23, 2015 7:45 AM
> Hi!
>
>> Maybe you can implement the __sleep method and just return the
>> documented attributes (message, code, file, line).
>
>That would be an option, but before going there, my question is - does
>anybody need it, really?
>
Hi.
Symfony2 stores an
AuthenticationException in the session,
when login credentials are invalid.
I think, exceptions should be serializable. One could strip
the objects from the backtrace and document it like that.
Christian