I'm giving a look at kohanaphp, and I was perplexed by the internal management of errors. When you initialize the framework, Kohana gives you the ability to disable the internal management of errors. When enabled, all errors (NOTICE, WARNING, etc..) are converted into using ErrorException exceptions. (http://php.net/manual/en/class.errorexception.php)
Kohana makes large use this system to detect errors generated by php, in the form of exceptions. Example:
try
{
$this->_connection = mysql_connect($hostname, $username, $password, TRUE);
}
catch (ErrorException $e)
{
// error connection.
throw new Database_Exception(':error', array(':error' => mysql_error()), mysql_errno());
}
My question is: if I disable error handling of Kohan, there is a risk of corrupting the business logic? And if so, why Kohana makes it possible to disable? Or is there something that escapes me?
According to you this way of handling errors native php correct?