Turned errors into exceptions
This commit is contained in:
parent
6e196637eb
commit
bb7b1f3321
1 changed files with 11 additions and 0 deletions
|
@ -26,3 +26,14 @@ final class AutoLoader
|
|||
AutoLoader::init();
|
||||
|
||||
require_once(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
|
||||
|
||||
function turnErrorsIntoExceptions()
|
||||
{
|
||||
set_error_handler(
|
||||
function($errno, $errstr, $errfile, $errline, array $errcontext)
|
||||
{
|
||||
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
|
||||
});
|
||||
}
|
||||
|
||||
turnErrorsIntoExceptions();
|
||||
|
|
Loading…
Reference in a new issue