LLDB mainline
lldb_protocol::mcp::MCPError Class Reference

#include <MCPError.h>

Inheritance diagram for lldb_protocol::mcp::MCPError:
[legend]

Public Member Functions

 MCPError (std::string message, int64_t error_code=kInternalError)
void log (llvm::raw_ostream &OS) const override
std::error_code convertToErrorCode () const override
const std::string & getMessage () const

Static Public Attributes

static char ID
static constexpr int64_t kResourceNotFound = -32002
static constexpr int64_t kInternalError = -32603

Private Attributes

std::string m_message
int m_error_code

Detailed Description

Definition at line 17 of file MCPError.h.

Constructor & Destructor Documentation

◆ MCPError()

MCPError::MCPError ( std::string message,
int64_t error_code = kInternalError )

Definition at line 19 of file MCPError.cpp.

References m_error_code, and m_message.

Member Function Documentation

◆ convertToErrorCode()

std::error_code MCPError::convertToErrorCode ( ) const
override

Definition at line 24 of file MCPError.cpp.

References m_error_code.

◆ getMessage()

const std::string & lldb_protocol::mcp::MCPError::getMessage ( ) const
inline

Definition at line 26 of file MCPError.h.

References m_message.

◆ log()

void MCPError::log ( llvm::raw_ostream & OS) const
override

Definition at line 22 of file MCPError.cpp.

References m_message.

Member Data Documentation

◆ ID

char MCPError::ID
static

Definition at line 19 of file MCPError.h.

◆ kInternalError

int64_t lldb_protocol::mcp::MCPError::kInternalError = -32603
staticconstexpr

Definition at line 29 of file MCPError.h.

◆ kResourceNotFound

int64_t lldb_protocol::mcp::MCPError::kResourceNotFound = -32002
staticconstexpr

Definition at line 28 of file MCPError.h.

Referenced by lldb_protocol::mcp::Server::ResourcesReadHandler().

◆ m_error_code

int lldb_protocol::mcp::MCPError::m_error_code
private

Definition at line 33 of file MCPError.h.

Referenced by convertToErrorCode(), and MCPError().

◆ m_message

std::string lldb_protocol::mcp::MCPError::m_message
private

Definition at line 32 of file MCPError.h.

Referenced by getMessage(), log(), and MCPError().


The documentation for this class was generated from the following files: