public static function register()
    {
        set_error_handler(
            function ($code, $message, $file, $line, $context) {
                if (error_reporting() == 0) {
                    return false;
                }
                ErrorType::forCode($code)->throwException($message, $file, $line, $context);
            }
        );
    }
public static function register()
    {
        set_error_handler(
            function ($code, $message, $file, $line, $context) {
                if (error_reporting() == 0) {
                    return false;
                }
                ErrorType::forCode($code)->throwException($message, $file, $line, $context);
            }
        );
    }
public static function register ( ) { set_error_handler ( function ( $ code , $ message , $ file , $ line , $ context ) { if ( error_reporting ( ) == 0 ) { return false ; } ErrorType :: forCode ( $ code ) -> throwException ( $ message , $ file , $ line , $ context ) ; } ) ; }
Converts all errors to the proper exception.
Converts all errors to the proper exception .