I am getting an uncaught exception:
[03-May-2013 14:28:39] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "review_id" violates not-null costraint' in /root/xrefload/lib/SyncJob/Action/Database.php:28
Stack trace:
#0 /root/xrefload/lib/SyncJob/Action/Database.php(28): PDOStatement->execute(Array)
#1 /root/xrefload/lib/SyncJob/RowOperation/RowOperation.php(86): Mdx\Prs\ProviderIdentifierLoad\SyncJob\Action\Database->execute(Array)
#2 /root/xrefload/lib/SyncJob/RowOperation/BCBSA/Moderation.php(46): Mdx\Prs\ProviderIdentifierLoad\SyncJob\RowOperation\RowOperation->execute()
#3 /root/xrefload/lib/SyncJob/SyncJob.php(85): Mdx\Prs\ProviderIdentifierLoad\SyncJob\RowOperation\BCBSA\Moderation->execute()
#4 /root/xrefload/lib/SyncJob/SyncJob.php(47): Mdx\Prs\ProviderIdentifierLoad\SyncJob\SyncJob->processDestinationSchema(Object(Mdx\Prs\ProviderIdentifierLoad\PrsSchemaConfig))
#5 /root/xrefload/sync_activity_bcbsa_to_local.php(49): Mdx\Prs\ProviderIdentifierLoad\SyncJob\SyncJob->execute()
#6 {main}
thrown in /root/xrefload/lib/SyncJob/Action/Database.php on line 28
So I went right to line 28 of /root/xrefload/lib/SyncJob/Action/Database.php and added a try/catch:
public function execute(array $row)
{
Log::get('a')->log('Executing query', PEAR_LOG_INFO);
try {
$this->stmt->execute($row);
}
catch(Exception $e) {
$msg = var_export($e,1);
Log::get('a')->log('query error'.PHP_EOL.$msg, PEAR_LOG_WARNING);
error_log($msg);
return array(0);
}
return array($this->stmt->rowCount());
}
However, I'm still getting the same error at the same line of code. Any ideas on what I'm doing wrong, or could it be some configuration issue (an exception handler setting?)?