Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '3.1/develop' into 3.2/develop. Refs #3929

  • Loading branch information...
commit d9c179c849166a44cf9972716e22e140e5ee2504 2 parents 65c4c3a + 82709bc
@cbandy cbandy authored
View
34 classes/kohana/database/exception.php
@@ -8,36 +8,4 @@
* @copyright (c) 2009 Kohana Team
* @license http://kohanaphp.com/license
*/
-class Kohana_Database_Exception extends Kohana_Exception {
-
- protected $db_code = NULL;
-
- /**
- * Creates a new translated database exception.
- *
- * throw new Database_Exception(1234, 'Something went terrible wrong, :user',
- * array(':user' => $user));
- *
- * @param string raw DB error code
- * @param string error message
- * @param array translation variables
- * @param integer the exception code
- * @return void
- */
- public function __construct($db_code, $message, array $variables = NULL, $code = 0)
- {
- $this->db_code = $db_code;
-
- parent::__construct($message, $variables, $code);
- }
-
- /**
- * Gets the DB error code
- *
- * @return string
- */
- public function db_code()
- {
- return $this->db_code;
- }
-}
+class Kohana_Database_Exception extends Kohana_Exception {}
View
5 classes/kohana/database/mysql.php
@@ -273,8 +273,9 @@ public function begin($mode = NULL)
if ($mode AND ! mysql_query("SET TRANSACTION ISOLATION LEVEL $mode", $this->_connection))
{
- throw new Database_Exception(mysql_errno($this->_connection), ':error', array(':error' => mysql_error($this->_connection)),
- mysql_errno($this->_connection));
+ throw new Database_Exception(':error',
+ array(':error' => mysql_error($this->_connection)),
+ mysql_errno($this->_connection));
}
return (bool) mysql_query('START TRANSACTION', $this->_connection);
Please sign in to comment.
Something went wrong with that request. Please try again.