Serializing exceptions

From: Date: Mon, 23 Mar 2015 05:21:49 +0000
Subject: Serializing exceptions
Groups: php.internals 
Request: Send a blank email to internals+get-85416@lists.php.net to get a copy of this message
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

« previous php.internals (#85416) next »