summaryrefslogtreecommitdiffstats
path: root/system/core/Exceptions.php
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
commite917f9be8b05c81357c1c2c9730d5060685d644d (patch)
treeb6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /system/core/Exceptions.php
parent5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff)
parente1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'system/core/Exceptions.php')
-rw-r--r--system/core/Exceptions.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 419ea2b61..108861de7 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -51,13 +51,13 @@ class CI_Exceptions {
/**
* Constructor
*
- */
+ */
function CI_Exceptions()
{
$this->ob_level = ob_get_level();
// Note: Do not log messages from this constructor.
}
-
+
// --------------------------------------------------------------------
/**
@@ -73,9 +73,9 @@ class CI_Exceptions {
* @return string
*/
function log_exception($severity, $message, $filepath, $line)
- {
+ {
$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
-
+
log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE);
}
@@ -89,7 +89,7 @@ class CI_Exceptions {
* @return string
*/
function show_404($page = '', $log_error = TRUE)
- {
+ {
$heading = "404 Page Not Found";
$message = "The page you requested was not found.";
@@ -102,7 +102,7 @@ class CI_Exceptions {
echo $this->show_error($heading, $message, 'error_404', 404);
exit;
}
-
+
// --------------------------------------------------------------------
/**
@@ -121,12 +121,12 @@ class CI_Exceptions {
function show_error($heading, $message, $template = 'error_general', $status_code = 500)
{
set_status_header($status_code);
-
+
$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
if (ob_get_level() > $this->ob_level + 1)
{
- ob_end_flush();
+ ob_end_flush();
}
ob_start();
include(APPPATH.'errors/'.$template.EXT);
@@ -148,21 +148,21 @@ class CI_Exceptions {
* @return string
*/
function show_php_error($severity, $message, $filepath, $line)
- {
+ {
$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
-
+
$filepath = str_replace("\\", "/", $filepath);
-
+
// For safety reasons we do not show the full file path
if (FALSE !== strpos($filepath, '/'))
{
$x = explode('/', $filepath);
$filepath = $x[count($x)-2].'/'.end($x);
}
-
+
if (ob_get_level() > $this->ob_level + 1)
{
- ob_end_flush();
+ ob_end_flush();
}
ob_start();
include(APPPATH.'errors/error_php'.EXT);