JulienBreux
4/15/2014 - 9:18 PM

PHP - Error to Exception

PHP - Error to Exception

<?php
set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontex) {
    throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
});