Expanded log message with Exception and its actual message.
[core.git] / inc / classes / main / database / backend / class_CachedLocalFileDatabase.php
index 7e486b1f38cf3959d4fe788718d737129b5d23b0..a81dd3cb3555143dcd3c367e7b5e6a0fbec8b3c3 100644 (file)
@@ -583,7 +583,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                        $this->setLastException($e);
 
                        // Throw an SQL exception
-                       throw new SqlException(array($this, sprintf('Cannot write data to table '%s', is the table created?', $dataSetInstance->getTableName()), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY);
+                       throw new SqlException(array($this, sprintf('Cannot write data to table '%s', is the table created? Exception: %s, message:%s', $dataSetInstance->getTableName(), $e->__toString(), $e->getMessage()), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY);
                }
        }