improved session error handling

fixes #1946
This commit is contained in:
Carsten Brandt
2014-03-29 23:54:26 +01:00
parent 8b4d4a0b25
commit c93231e26b
6 changed files with 54 additions and 37 deletions

View File

@@ -182,10 +182,11 @@ class DbSession extends Session
->execute();
}
} catch (\Exception $e) {
if (YII_DEBUG) {
echo $e->getMessage();
}
// it is too late to log an error message here
$exception = ErrorHandler::convertExceptionToString($e);
// its too late to use Yii logging here
error_log($exception);
echo $exception;
return false;
}