當前位置: 首頁>>代碼示例>>Python>>正文


Python ErrorCodeManager.getError方法代碼示例

本文整理匯總了Python中staticdata.manager.ErrorCodeManager.ErrorCodeManager.getError方法的典型用法代碼示例。如果您正苦於以下問題:Python ErrorCodeManager.getError方法的具體用法?Python ErrorCodeManager.getError怎麽用?Python ErrorCodeManager.getError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在staticdata.manager.ErrorCodeManager.ErrorCodeManager的用法示例。


在下文中一共展示了ErrorCodeManager.getError方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: generalUpdate

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
    def generalUpdate(data, request=None):
        tb = MongoDatabase.findTableByMessageObj(data)

        if tb:
            tb.update(data)
        else:
            error = ErrorCodeManager.getError("ErrorDb_TableNotFound")
            request.error(error.what, error.code)
            return

        if request:
            request.response()
開發者ID:bropony,項目名稱:gamit,代碼行數:14,代碼來源:dboperhelper.py

示例2: updateTFamilyMemberBatch

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
    def updateTFamilyMemberBatch(self, familyMembers, _request):
        """
        :type familyMembers: list[message.db.mongodb.usertables.TFamilyMember]
        :type _request: ITableSaver_Updatetfamilymemberbatch_Request
        """

        tb = MongoDatabase.findTableByMessageType(TFamilyMember)

        if tb:
            tb.update(familyMembers)
        else:
            error = ErrorCodeManager.getError("ErrorDb_TableNotFound")
            _request.error(error.what, error.code)
            return

        _request.response()
開發者ID:bropony,項目名稱:gamit,代碼行數:18,代碼來源:itablesaverimpl.py

示例3: loadSysTopics

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
    def loadSysTopics(self, pageIndex, numPerPage, _request):
        """
        :type pageIndex: int
        :type numPerPage: int
        :type _request: message.db.itablesaver.ITableSaver_Loadsystopics_Request
        """
        Logger.log("Loading SysTopics request...")

        tb = MongoDatabase.findTableByMessageType(TSysTopic)
        if not tb:
            error = ErrorCodeManager.getError("ErrorDb_TableNotFound")
            _request.error(error.what, error.code)
            return

        skips = pageIndex * numPerPage
        res = tb.findManyWithQuey({}, limit=numPerPage, skip=skips, sort=[("_id", -1)])
        topicList = SeqTSysTopic()
        topicList.extend(res)
        _request.response(topicList)
開發者ID:bropony,項目名稱:gamit,代碼行數:21,代碼來源:itablesaverimpl.py

示例4: removeFamilyMembers

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
    def removeFamilyMembers(self, userId, indexes, _request):
        """
        :type userId: str
        :type indexes: list[int]
        :type _request: ITableSaver_Removefamilymembers_Request
        """

        tb = MongoDatabase.findTableByMessageType(TFamilyMember)

        if not tb:
            error = ErrorCodeManager.getError("ErrorDb_TableNotFound")
            _request.error(error.what, error.code)
            return

        for index in indexes:
            query = {TFamilyMember.fn_userId: userId, TFamilyMember.fn_index: index}
            tb.delete(query, True)

        _request.response()
開發者ID:bropony,項目名稱:gamit,代碼行數:21,代碼來源:itablesaverimpl.py

示例5: generalError

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
 def generalError(request, errorName):
     error = ErrorCodeManager.getError("ErrorDb_TableNotFound")
     request.error(error.what, error.code)
開發者ID:bropony,項目名稱:gamit,代碼行數:5,代碼來源:dboperhelper.py

示例6: onTimeout

# 需要導入模塊: from staticdata.manager.ErrorCodeManager import ErrorCodeManager [as 別名]
# 或者: from staticdata.manager.ErrorCodeManager.ErrorCodeManager import getError [as 別名]
 def onTimeout(self):
     self.clientRequest.error(ErrorCodeManager.getError("ErrorLogin_signupOperTimeout"))
開發者ID:bropony,項目名稱:gamit,代碼行數:4,代碼來源:userdbcallback.py


注:本文中的staticdata.manager.ErrorCodeManager.ErrorCodeManager.getError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。