mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Add logging and error when fixture creation fails.
This helps people find and solve issues faster/easier. Fixes #3044
This commit is contained in:
parent
a63dd9ee9d
commit
3b46cd43f1
1 changed files with 8 additions and 0 deletions
|
@ -194,6 +194,14 @@ class CakeTestFixture {
|
|||
$db->execute($db->createSchema($this->Schema), array('log' => false));
|
||||
$this->created[] = $db->configKeyName;
|
||||
} catch (Exception $e) {
|
||||
$msg = __d(
|
||||
'cake_dev',
|
||||
'Fixture creation for "%s" failed "%s"',
|
||||
$this->table,
|
||||
$e->getMessage()
|
||||
);
|
||||
CakeLog::error($msg);
|
||||
trigger_error($msg, E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue