[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 31 10:30:56 PDT 2025
================
@@ -19,10 +19,39 @@
#include "lldb/lldb-forward.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
-#include <optional>
+#include <chrono>
+#include <system_error>
namespace lldb_dap {
+class EndOfFileError : public llvm::ErrorInfo<EndOfFileError> {
+public:
+ static char ID;
+
+ EndOfFileError() = default;
+
+ void log(llvm::raw_ostream &OS) const override {
+ OS << "End of file reached.";
+ }
+ std::error_code convertToErrorCode() const override {
+ return llvm::inconvertibleErrorCode();
+ }
+};
+
+class TimeoutError : public llvm::ErrorInfo<TimeoutError> {
+public:
+ static char ID;
+
+ TimeoutError() = default;
+
+ void log(llvm::raw_ostream &OS) const override {
+ OS << "Operation timed out.";
+ }
----------------
JDevlieghere wrote:
```suggestion
void log(llvm::raw_ostream &OS) const override {
OS << "operation timed out";
}
```
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list