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 no exception message

i have the following table:

id int(11) PK NOT NULL
name VARCHAR(11)

Note; id is not auto_increment

When i tried to insert:

    $entry = new Table1();
    $entry->name = 'Juan';
        echo $entry->getMessage(); //no error
}catch(Exception $e){
    echo $e->getMessage(); //no error
}catch(\Phalcon\Mvc\Model\Exception $x){
    echo $x->getMessage(); //no error
}catch(\PDOException $r){
    echo $r->getMessage(); //no error

I expect an error because i didn't define id, id is not auto increment, however, php doesn't give me anything. Please help.

The entry was not inserted btw.

edited Jul '16

And you don't have anything in logs ? What just $entry->save return ? Also you should do print_r($entry->getMessages()) instead of $entry->getMessage() There are no basically method like getMessage() in Phalcon\Mvc\Model, there is getMessages() which returns array of messages.