mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding more verbose info to connection errors.
The start page now shows the connection exception message. Fixes #875
This commit is contained in:
parent
254357e9c9
commit
50b253565a
1 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,7 @@ if (isset($filePresent)):
|
|||
App::uses('ConnectionManager', 'Model');
|
||||
try {
|
||||
$connected = ConnectionManager::getDataSource('default');
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $connectionError) {
|
||||
$connected = false;
|
||||
}
|
||||
?>
|
||||
|
@ -110,6 +110,8 @@ if (isset($filePresent)):
|
|||
else:
|
||||
echo '<span class="notice">';
|
||||
echo __d('cake_dev', 'Cake is NOT able to connect to the database.');
|
||||
echo '<br /><br />';
|
||||
echo $connectionError->getMessage();
|
||||
echo '</span>';
|
||||
endif;
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue