39 : m_opaque_up(new
Status(std::move(status))) {
73 bool ret_value =
false;
84 bool ret_value =
true;
157int SBError::SetErrorStringWithFormat(
const char *format, ...) {
161 va_start(args, format);
162 if (format !=
nullptr && format[0]) {
163 llvm::SmallString<1024> buf;
165 string = std::string(buf.str());
169 return string.size();
174 return this->
operator bool();
176SBError::operator bool()
const {
179 return m_opaque_up !=
nullptr;
206 description.Printf(
"success");
209 description.Printf(
"error: %s",
210 (err_string !=
nullptr ? err_string :
""));
213 description.Printf(
"error: <NULL>");
#define LLDB_INSTRUMENT_VA(...)
uint32_t GetError() const
Get the error code.
bool GetDescription(lldb::SBStream &description)
std::unique_ptr< lldb_private::Status > m_opaque_up
void SetErrorString(const char *err_str)
void SetError(uint32_t err, lldb::ErrorType type)
const SBError & operator=(const lldb::SBError &rhs)
lldb_private::Status & ref()
lldb::ErrorType GetType() const
const lldb_private::Status & operator*() const
void SetErrorToGenericError()
const char * GetCString() const
Get the error string as a NULL terminated UTF8 c-string.
lldb_private::Status * operator->()
SBStructuredData GetErrorData() const
Get the error in machine-readable form.
lldb_private::Status * get()
StructuredDataImplUP m_impl_up
static Status FromErrno()
Set the current error to errno.
static Status FromErrorString(const char *str)
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
bool VASprintf(llvm::SmallVectorImpl< char > &buf, const char *fmt, va_list args)