src/eric7/RemoteServerInterface/EricServerDebuggerInterface.py

branch
server
changeset 10563
b4b47c1a02ba
parent 10561
be23a662d709
child 10574
622e59b51640
equal deleted inserted replaced
10561:be23a662d709 10563:b4b47c1a02ba
55 @param debuggerId id of the debug client to send the command to 55 @param debuggerId id of the debug client to send the command to
56 @type str 56 @type str
57 @param jsonCommand JSON encoded command dictionary to be relayed 57 @param jsonCommand JSON encoded command dictionary to be relayed
58 @type str 58 @type str
59 """ 59 """
60 self.__serverInterface.sendJson( 60 if self.__serverInterface.isServerConnected():
61 category=EricRequestCategory.Debugger, 61 self.__serverInterface.sendJson(
62 request="DebugClientCommand", 62 category=EricRequestCategory.Debugger,
63 params={"debugger_id": debuggerId, "command": jsonCommand}, 63 request="DebugClientCommand",
64 ) 64 params={"debugger_id": debuggerId, "command": jsonCommand},
65 )
65 66
66 @pyqtSlot(str, dict) 67 @pyqtSlot(str, dict)
67 def __handleDebuggerReply(self, reply, params): 68 def __handleDebuggerReply(self, reply, params):
68 """ 69 """
69 Private slot to handle a debugger reply from the eric-ide server. 70 Private slot to handle a debugger reply from the eric-ide server.
71 @param reply name of the server reply 72 @param reply name of the server reply
72 @type str 73 @type str
73 @param params dictionary containing the reply data 74 @param params dictionary containing the reply data
74 @type dict 75 @type dict
75 """ 76 """
76 try: 77 if self.__serverInterface.isServerConnected():
77 self.__replyMethodMapping[reply](params) 78 try:
78 except KeyError: 79 self.__replyMethodMapping[reply](params)
79 EricMessageBox.critical( 80 except KeyError:
80 None, 81 EricMessageBox.critical(
81 self.tr("Unknown Server Reply"), 82 None,
82 self.tr( 83 self.tr("Unknown Server Reply"),
83 "<p>The eric-ide server debugger interface sent the unknown reply" 84 self.tr(
84 " <b>{0}</b>.</p>" 85 "<p>The eric-ide server debugger interface sent the unknown"
85 ).format(reply), 86 " reply <b>{0}</b>.</p>"
86 ) 87 ).format(reply),
88 )
87 89
88 ####################################################################### 90 #######################################################################
89 ## Methods for handling of debug client replies. 91 ## Methods for handling of debug client replies.
90 ####################################################################### 92 #######################################################################
91 93

eric ide

mercurial