Re: Serializing Closures

From: Date: Thu, 01 Apr 2010 04:25:12 +0000
Subject: Re: Serializing Closures
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-47700@lists.php.net to get a copy of this message
Hi!
prevented. The short background of what I'm doing is serializing backtraces when errors occur so that I can better diagnose bugs my clients report. But when a closure is passed as a function parameter somewhere in the call tree, things just flat out exlode with the error:
Hmm, serializing backtrace may be tricky - a lot of stuff there might be unserializable. In general, serializing is not meant to be used for debugging. You might have better luck with debug printing functions. But nevertheless this:
Fatal error: Exception thrown without a stack frame in Unknown on line *0*
doesn't look good. It'd be nice if you made a short code example and submitted a bug about it. I think reporting there might be improved.
Thus, would it be possible to degrade this from something as severe as an exception to being a simple warning, or just silently ignoring it and continuing with the serialization? I would compare this to resource handles for mysql connections and the like. Those are silently ignored.
Maybe it should be null+warning? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#47700) next »