Skip to content

Argument 1 passed to Cake\Error\ExceptionRenderer::__construct() must be an instance of Exception #11514

@psantos10

Description

@psantos10

This is a (multiple allowed):

  • bug

  • CakePHP Version: 3.5.7

  • Platform and Target: PHP 7.1.11; MariaDB 10.2.11

What you did

I write this code on the controller:

$categories = TableRegistry::get('Categories');
$category = $categories->find('all');

What happened

Gives me this error:

Argument 1 passed to Cake\Error\ExceptionRenderer::__construct() must be an instance of Exception, instance of Error given, called in /home/psantos/Workspace/my_app/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php on line 167

What you expected to happen

I was expecting to get a more descriptive error info. no matter what change I do, I stil getting the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions