When I'm trying to connect to wrong database I'm getting standart kohana exception message like this:
Database_Exception [ 1049 ]: Unknown database 'mywrongdatabase'
MODPATH\database\classes\kohana\database\mysql.php [ 108 ]
protected function _select_db($database)
{
if ( ! mysql_select_db($database, $this->_connection))
{
// Unable to select database
[line 108] throw new Database_Exception(':error',
array(':error' => mysql_error($this->_connection)),
mysql_errno($this->_connection));
}
Database_MySQL::$_current_databases[$this->_connection_id] = $database;
This came out from file
MODPATH\database\classes\kohana\database\mysql.php [ 108 ]
How to set (and where) own message instead of standart kohana's exception? Also I don't want to modify any kohana standart modules (like database) or system files.