diff options
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_driver.php | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index c296d4ca8..35bdc29b6 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1117,12 +1117,11 @@ class CI_DB_driver { */
function display_error($error = '', $swap = '', $native = FALSE)
{
-// $LANG = new CI_Lang();
- $LANG = new CI_Language();
+ global $LANG;
$LANG->load('db');
- $heading = 'Database Error';
-
+ $heading = $LANG->line('db_error_heading');
+
if ($native == TRUE)
{
$message = $error;
@@ -1131,20 +1130,14 @@ class CI_DB_driver { {
$message = (! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
}
-
- if (! class_exists('CI_Exceptions'))
- {
-// include(BASEPATH.'core/Exceptions'.EXT);
- include(BASEPATH.'libraries/Exceptions'.EXT);
- }
- $error = new CI_Exceptions();
- echo $error->show_error('An Error Was Encountered', $message, 'error_db');
+ $error =& load_class('Exceptions');
+ echo $error->show_error($heading, $message, 'error_db');
exit;
}
}
- -/* End of file DB_driver.php */ +
+/* End of file DB_driver.php */
/* Location: ./system/database/DB_driver.php */
\ No newline at end of file |