summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-03-14 21:13:07 +0000
committerthomascube <thomas@roundcube.net>2006-03-14 21:13:07 +0000
commit8affba5be0de8ec5b7bf71e12171ccb53ead497b (patch)
tree44554a9b9db111b8ab163d55ea2e5ad06fcf350a /index.php
parenta2f2c5e1b7c8ed6d398eb6fd751f94553fa7d38e (diff)
Improved error handling in DB connection failure
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/index.php b/index.php
index 70f04701c..7443aaf81 100644
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
/*
+-----------------------------------------------------------------------+
| RoundCube Webmail IMAP Client |
- | Version 0.1-20060220 |
+ | Version 0.1-20060314 |
| |
| Copyright (C) 2005, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
@@ -110,6 +110,15 @@ if ($_framed)
// init necessary objects for GUI
load_gui();
+
+// check DB connections and exit on failure
+if ($err_str = $DB->is_error())
+ {
+ raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,
+ 'message' => $err_str), FALSE, TRUE);
+ }
+
+
// error steps
if ($_action=='error' && !empty($_GET['_code']))
{