def __get__(self, instance, owner):
supers = (SysException, self.ex_type, Exception) \
if self.ex_type and self.ex_type is not Exception else (SysException, Exception)
api_ex_cls = types.new_class('SysException', supers, {}, lambda ns: ns)
api_ex = api_ex_cls(err_msg=self.err_msg, err_code=self.err_code, http_code=self.http_code)
return api_ex
评论列表
文章目录