We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon is not throwing exception on SQL error or method doesn't exist in model

it is really weird but if I do this (note the typo in the model's method findFirst)

$entryType = EntryType::findFisrt(
                            array(
                                'sdfkhkhj = :name:',
                                'bind' => array('name' => $entry_type)
                                )
                        );

my page silently dies with no exception or a message in the error log. Nothing, just an empty page. Moveover if the method name is right but I specify an invalid field name (like sdfkhkhj above) - the page outputs nothing.

I have Phalcon debug component enabled with

(new Phalcon\Debug)->listen(); // TODO: Remove this line in prod

I have tried to disable it but it doesn't show any expection anyway.

set in the php.ini

ini_set('display_errors', true);
error_reporting(E_ALL);

there can not be try/catch blocks in code for the debug works.

screenshot

It is on and there are no try/catch anywhere in PHP code. Any other tips?

edited Jul '15

Also, I have checked the nginx log files and everytime the response code is 200 192.168.56.1 - - [06/Jul/2015:12:27:19 +0000] "POST /entry/create HTTP/1.1" 200 31 "https://homediary.dev/timeline"

So, it appears it is purely PHP/Phalcon problem. The PHPInfo page is here



5.2k
Accepted
answer

I have figured it out. The problem was in the missing action for an "errors" controller that exceptions have been routed to via dispatch:beforeException