// Add exceptions in db classes + normalize some files + split defines.inc file

This commit is contained in:
rMalie
2011-10-11 10:04:23 +00:00
parent 3cbac2362c
commit 3574f0a923
10 changed files with 86 additions and 57 deletions
+2 -2
View File
@@ -43,12 +43,12 @@ class DbPDOCore extends Db
}
catch (PDOException $e)
{
die(Tools::displayError('Link to database cannot be established. ('.$e->getMessage().')'));
throw new PrestashopDatabaseException(Tools::displayError('Link to database cannot be established. ('.$e->getMessage().')'));
}
// UTF-8 support
if ($this->link->exec('SET NAMES \'utf8\'') === false)
die(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
throw new PrestashopDatabaseException(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
return $this->link;
}