odbc_errormsg does not report error messages from odbc_execute the way it\'s supposed to. It merely throws a warning. So I\'ve been forced to write a hack to parse the erro
You could change your custom error handler to return false, just when the error is ignored (@-operator used).
function custom_error_handler($errno, $errstr, $errfile, $errline){
$ignore = ($errno & error_reporting()) == 0;
if ($ignore) {
return FALSE;
}
echo "[Error happened: $errstr]\n";
return TRUE;
}