diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-03-14 21:13:07 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-03-14 21:13:07 +0000 |
| commit | e322cd85ca85586327d047bc73c30c366a7bb0c6 (patch) | |
| tree | e9a03ef9d90e4ef1b3301d0cc4b413ffbc82468d /roundcubemail/index.php | |
| parent | 6eac53131558fbd939eb4ff1bdc0d09246ceb116 (diff) | |
Improved error handling in DB connection failure
git-svn-id: https://svn.roundcube.net/trunk@164 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/index.php')
| -rw-r--r-- | roundcubemail/index.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 70f04701c..7443aaf81 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/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'])) { |
