================
@@ -117,29 +63,20 @@ void RestartRequestHandler::operator()(
 
   // FIXME: Should we run 'preRunCommands'?
   // FIXME: Should we add a 'preRestartCommands'?
-  if (llvm::Error err = LaunchProcess(*dap.last_launch_request)) {
-    response["success"] = llvm::json::Value(false);
-    EmplaceSafeString(response, "message", llvm::toString(std::move(err)));
-    dap.SendJSON(llvm::json::Value(std::move(response)));
-    return;
-  }
+  if (llvm::Error err = LaunchProcess(*dap.last_launch_request))
+    return llvm::make_error<DAPError>(llvm::toString(std::move(err)));
 
   SendProcessEvent(dap, Launch);
 
   // This is normally done after receiving a "configuration done" request.
   // Because we're restarting, configuration has already happened so we can
   // continue the process right away.
   if (dap.stop_at_entry) {
-    if (llvm::Error err = SendThreadStoppedEvent(dap, /*on_entry=*/true)) {
-      EmplaceSafeString(response, "message", llvm::toString(std::move(err)));
-      dap.SendJSON(llvm::json::Value(std::move(response)));
-      return;
-    }
+    if (llvm::Error err = SendThreadStoppedEvent(dap, /*on_entry=*/true))
+      return llvm::make_error<DAPError>(llvm::toString(std::move(err)));
----------------
ashgti wrote:

Same as above

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

Reply via email to