================
@@ -50,17 +56,88 @@ class TransportUnhandledContentsError
   std::string m_unhandled_contents;
 };
 
+class InvalidParams : public llvm::ErrorInfo<InvalidParams> {
+public:
+  static char ID;
+
+  explicit InvalidParams(std::string method, std::string context)
+      : m_method(std::move(method)), m_context(std::move(context)) {}
+
+  void log(llvm::raw_ostream &OS) const override;
+  std::error_code convertToErrorCode() const override;
+
+private:
+  std::string m_method;
+  std::string m_context;
+};
+
+// Value for tracking functions that have a void param or result.
+using VoidT = std::monostate;
+
+template <typename T> using Callback = llvm::unique_function<T>;
----------------
JDevlieghere wrote:

Is this enclosed in a namespace? This is to generic to belongs in the 
`lldb_private` namespace. Maybe we can limit this in scope by wrapping 
everything in a `lldb_private::transport` namespace? 

https://github.com/llvm/llvm-project/pull/159160
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to