summaryrefslogtreecommitdiffstats
path: root/system/core/Exceptions.php
diff options
context:
space:
mode:
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);