Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding more verbose info to connection errors.

The start page now shows the connection exception message.
Fixes #875
  • Loading branch information...
commit 50b253565a616776d434645d5345358aa0fab640 1 parent 254357e
@markstory markstory authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/View/Pages/home.ctp
View
4 lib/Cake/View/Pages/home.ctp
@@ -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;
?>
Please sign in to comment.
Something went wrong with that request. Please try again.