Skip to content

Method App\View\Cell\WhateverCell::__toString() must not throw an exception #7

Description

@gtrias

I'm having this error with WhoopsHandler, note that with default Cakephp 3 ErrorHandler I can see the trigger_error rised by Cell __toString() method. I'm not sure if the error is from the plugin or the Whoops library itself but I post here because is related with cakephp as well.

This error makes very hard to debug errors on Cell's templates.

To reproduce the error create a cell and on its display.ctp write the next:

<?php

$somearray = array('testing' => 'values');

// then try to echo 
echo $somearray;

Some useful information about this error:

http://stackoverflow.com/questions/2429642/why-its-impossible-to-throw-exception-from-tostring
http://www.phpsadness.com/sad/14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions