summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite3
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 16:46:47 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 16:46:47 +0200
commitebbfefafb4498c2b84eb2c4608d7c97da10b1b09 (patch)
tree8c9a7c4bdd3c87821102763f873936b8f5ae43be /system/database/drivers/sqlite3
parent9e31f8f1600c6577f46a855eee6a3c7d527aebea (diff)
Fix SQLite3 DB error handling
Diffstat (limited to 'system/database/drivers/sqlite3')
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php21
1 files changed, 6 insertions, 15 deletions
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php
index 23145e7f9..d03be15f5 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -284,25 +284,16 @@ class CI_DB_sqlite3_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * The error message string
+ * Error
*
- * @return string
- */
- protected function _error_message()
- {
- return $this->conn_id->lastErrorMsg();
- }
-
- // --------------------------------------------------------------------
-
- /**
- * The error message number
+ * Returns an array containing code and message of the last
+ * database error that has occured.
*
- * @return int
+ * @return array
*/
- protected function _error_number()
+ public function error()
{
- return $this->conn_id->lastErrorCode();
+ return array('code' => $this->conn_id->lastErrorCode(), 'message' => $this->conn_id->lastErrorMsg());
}
// --------------------------------------------------------------------