src/Exception/HttpException.php
public static function factory($code, $message = null, array $variables = null, Exception $previous = null)
    {
        $class = 'tourze\Http\Exception\Http' . $code . 'Exception';

        return new $class($message, $variables, $previous);
    }
public static function factory($code, $message = null, array $variables = null, Exception $previous = null)
    {
        $class = 'tourze\Http\Exception\Http' . $code . 'Exception';

        return new $class($message, $variables, $previous);
    }
创建一个指定类型的HTTP异常类

@param  int       $code      状态码
@param  string    $message   消息文本
@param  array     $variables 消息文本的翻译变量
@param  Exception $previous
@return HttpException