I need to catch and process error, when i try to remove entity from db.
[Error deleting record: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (
zdf.cats, CONSTRAINTFK_cats_CategoriesFOREIGN KEY (category_id) REFERENCEScategories(id) ON DELETE NO ACTION ON UPDATE NO ACTION)]
i try to remove entity by button click in with "deleteURL"
$dbCategories = new Application_Model_DbTable_Categories();
$source = new Bvb_Grid_Source_Zend_Select($dbCategories->getCategoriesByAppId(1, true));
$columns = array('title', 'actions');
$columnsPositions = array('title');
$extraColumns = array(
0 => $this->createExtraColumn(array(
'name' => 'actions',
'position' => 'right',
'title' => 'Actions',
'decorator' => '<a class="edit-button" href="{{editUrl}}"> </a><a class="remove-button" href="{{deleteUrl}}"> </a>'
))
);