summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-15 22:44:52 +0200
committeradmin <devnull@localhost>2006-09-15 22:44:52 +0200
commit43a46cc3d3d485a50c287d33ad94f044f8a6c46c (patch)
tree8dbf68faef944c48061785a0e8104f55f7d211e3 /system
parent633ec3758910482863299c7122dda3c15d9758a8 (diff)
Diffstat (limited to 'system')
-rw-r--r--system/codeigniter/Common.php36
1 files changed, 4 insertions, 32 deletions
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index 6d76fb098..a4531a7d0 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -110,12 +110,7 @@ function &_get_config()
*/
function show_error($message)
{
- if ( ! class_exists('CI_Exceptions'))
- {
- include_once(BASEPATH.'libraries/Exceptions.php');
- }
-
- $error = new CI_Exceptions();
+ $error =& _load_class('CI_Exceptions');
echo $error->show_error('An Error Was Encountered', $message);
exit;
}
@@ -133,12 +128,7 @@ function show_error($message)
*/
function show_404($page = '')
{
- if ( ! class_exists('CI_Exceptions'))
- {
- include_once(BASEPATH.'libraries/Exceptions.php');
- }
-
- $error = new CI_Exceptions();
+ $error =& _load_class('CI_Exceptions');
$error->show_404($page);
exit;
}
@@ -163,20 +153,7 @@ function log_message($level = 'error', $message, $php_error = FALSE)
return;
}
- if ( ! class_exists('CI_Log'))
- {
- include_once(BASEPATH.'libraries/Log.php');
- }
-
- if ( ! is_object($LOG))
- {
- $LOG = new CI_Log(
- $config['log_path'],
- $config['log_threshold'],
- $config['log_date_format']
- );
- }
-
+ $LOG =& _load_class('CI_Log');
$LOG->write_log($level, $message, $php_error);
}
@@ -209,12 +186,7 @@ function _exception_handler($severity, $message, $filepath, $line)
return;
}
- // Send the PHP error to the log file...
- if ( ! class_exists('CI_Exceptions'))
- {
- include_once(BASEPATH.'libraries/Exceptions.php');
- }
- $error = new CI_Exceptions();
+ $error =& _load_class('CI_Exceptions');
// Should we display the error?
// We'll get the current error_reporting level and add its bits