LSsession : Catch initialization exceptions

This commit is contained in:
Benjamin Renard 2015-07-25 18:24:03 +02:00
parent 772cd8b0da
commit 40b8be065b

View file

@ -444,19 +444,24 @@ class LSsession {
* @retval boolean True si l'initialisation à réussi, false sinon.
*/
public static function initialize() {
if (!self :: startLSconfig()) {
return;
try {
if (!self :: startLSconfig()) {
return;
}
self :: startLSerror();
self :: startLStemplate();
session_start();
self :: setLocale();
self :: loadLSaddons();
self :: loadLSauth();
}
catch (Exception $e) {
die('LSsession : fail to initialize session. Error : '.$e->getMessage());
}
self :: startLSerror();
self :: startLStemplate();
session_start();
self :: setLocale();
self :: loadLSaddons();
self :: loadLSauth();
return true;
}