def add_status_code(code):
    """用于将mprpc的标准异常注册到`_mprpc_exceptions`的装饰器.

    Parameters:
        code (int): - 标准状态码
    Return:
        (Callable): - 装饰函数

    """
    def class_decorator(cls):
        """内部装饰函数,用于将异常类注册到对应的状态码.

        Parameters:
            cls (Callable): - 要注册的异常类
        Return:
            (Callable): - 注册的异常类

        """
        cls.status_code = code
        _mprpc_exceptions[code] = cls
        return cls

    return class_decorator