Permalink
Browse files

Use message and code from the generated exception. Fixes #3608

  • Loading branch information...
1 parent e353340 commit f7433b1cf5ebe8378e57572f1360103395066ed7 @cbandy cbandy committed Jul 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 classes/kohana/database/mysql.php
@@ -59,14 +59,14 @@ public function connect()
$this->_connection = mysql_connect($hostname, $username, $password, TRUE);
}
}
- catch (ErrorException $e)
+ catch (Exception $e)
{
// No connection exists
$this->_connection = NULL;
throw new Database_Exception(':error',
- array(':error' => mysql_error()),
- mysql_errno());
+ array(':error' => $e->getMessage()),
+ $e->getCode());
}
// \xFF is a better delimiter, but the PHP driver uses underscore

0 comments on commit f7433b1

Please sign in to comment.