I have this piece of code:
try
{
foreach($obj_c->getGalleries($db_conn1) as $gallery)
{
$gallery->Save($db_conn1);
}
$k = 0;
$testing_the_exception = 15/$k;
//settin status to 1...
$obj_c->set_exec_status(3, 1, $db_conn1);
}
catch (Exception $e)
{
//settin status to 3...
$obj_c->set_exec_status(3, 3, $db_conn1);
echo 'Caught exception: ', $e->getMessage(), "\n";
}
unset($obj_c);
The fact is that it should be entering into the catch part, because of the division by zero exception, but instead it is just popping a warning and continuing to set status to 1. Is this the expected behaviour? Thanks a lot in advance.