If DEBUG - send exception as HTTP 500

This commit is contained in:
Anton Terekhov
2011-06-01 22:25:06 +04:00
parent 2a11b9b4f6
commit 4dcbf284cc

View File

@ -121,6 +121,9 @@ class FrontController
return (!DEBUG) ? $html : Profiler::getInstance()->end($html);
} catch(Exception $e) {
if (DEBUG == true) {
if (!headers_sent()) {
header('HTTP/1.0 500 Internal Server Error');
}
return ErrorHandler::showDebug($e);
}
$layout = new ErrorLayout();