================
@@ -35,29 +36,34 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap,
       m_line(breakpoint.line),
       m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {}
 
-void SourceBreakpoint::SetBreakpoint(const protocol::Source &source) {
+llvm::Error SourceBreakpoint::SetBreakpoint(const protocol::Source &source) {
   lldb::SBMutex lock = m_dap.GetAPIMutex();
   std::lock_guard<lldb::SBMutex> guard(lock);
 
   if (m_line == 0)
-    return;
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Invalid line number.");
 
   if (source.sourceReference) {
     // breakpoint set by assembly source.
     lldb::SBAddress source_address(*source.sourceReference, m_dap.target);
     if (!source_address.IsValid())
-      return;
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
----------------
ashgti wrote:

Ah, my mistake, I thought this was a generic error returned by the request, not 
a message on the `breakpoint` type.

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

Reply via email to