On 3 August 2011 00:51, Stas Malyshev wrote:
> Hi!
>
> On 8/2/11 7:51 AM, Etienne Kneuss wrote:
>>
>> The (historic) reason is that the toString conversion occurs at
>> various places in the engine, and in some of them, throwing exceptions
>> caused trouble. It is not clear whether this limitation
Hi!
On 8/2/11 7:51 AM, Etienne Kneuss wrote:
The (historic) reason is that the toString conversion occurs at
various places in the engine, and in some of them, throwing exceptions
caused trouble. It is not clear whether this limitation it still
required. In any case, it could almost certainly be
On Tue, Aug 2, 2011 at 4:47 PM, Richard Quadling wrote:
> Hi.
>
> Given the relatively simple code below, why can't I throw an exception
> in __toString()?
>
> class AlwaysFails {
> public function asString() {
> throw new Exception('Failed in asString()');
> }
>
> public function __toStrin
On 2 August 2011 16:09, Keloran wrote:
> i didnt think any of the magic functions could throw exceptions
All magic methods can throw exceptions except __toString.
There is some oddity with __set_state() (in terms of the pattern of
output is different).
http://pastebin.com/nGkP7kKf
outputs ...
Hello,
On Tue, Aug 2, 2011 at 16:47, Richard Quadling wrote:
> Hi.
>
> Given the relatively simple code below, why can't I throw an exception
> in __toString()?
The (historic) reason is that the toString conversion occurs at
various places in the engine, and in some of them, throwing exceptions