================
@@ -555,15 +555,22 @@ def _await_response(self, seq: int, timeout: float = 0.0) 
-> dict:
     # response when it arrives. An optional timeout for the response may be 
passed.
     # If allow_failure is passed, then the result may instead be a str 
containing the fail reason if the request failed.
     def _communicate_request(
-        self, command: str, arguments=None, timeout: float = 60.0, 
allow_failure=False
+        self, command: str, arguments=None, timeout: float = 60.0
+    ) -> Dict:
+        req_id = self.send_message(self.make_request(command, arguments))
+        response = self._await_response(req_id, timeout)
+        if not response["success"]:
+            raise DebuggerException(
+                f"received failure response for command {command}: 
{response['message']}"
+            )
+        return response["body"]
+
+    def _communicate_fallible_request(
----------------
OCHyams wrote:

Why introduce this additional function over using the `allow_failure` 
parameter? 

https://github.com/llvm/llvm-project/pull/202802
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to