* @param Exception $e
* @throws Exception
*
- * @todo invent hooking mechanism for database/backend independant exception handling (like lock timeouts)
+ * @todo invent hooking mechanism for database/backend independent exception handling (like lock timeouts)
*/
protected function _handleRecordCreateOrUpdateException(Exception $e)
{
Tinebase_TransactionManager::getInstance()->rollBack();
- if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());
- if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . $e->getTraceAsString());
-
+ if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
+ . ' Exception: ' . $e->getMessage());
+
if ($e instanceof Zend_Db_Statement_Exception && preg_match('/Lock wait timeout exceeded/', $e->getMessage())) {
throw new Tinebase_Exception_Backend_Database_LockTimeout($e->getMessage());
}
$tag = NULL;
- if (isset($_tagData['id'])) {
+ if (isset($_tagData['id']) && ! empty($_tagData['id'])) {
try {
$tag = Tinebase_Tags::getInstance()->get($_tagData['id']);
return $tag;
*/
protected function _handleImportException(Exception $e, $recordIndex, $record = null, $allowToResolveDuplicates = true)
{
- Tinebase_Exception::log($e);
-
if ($e instanceof Tinebase_Exception_Duplicate) {
$exception = $this->_handleDuplicateExceptions($e, $recordIndex, $record, $allowToResolveDuplicates);
} else {
+ Tinebase_Exception::log($e);
+
$this->_importResult['failcount']++;
$exception = array(
'code' => $e->getCode(),