This is a (multiple allowed):
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.