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