42 return m_opaque_up->AsCString();
56 bool ret_value =
false;
58 ret_value = m_opaque_up->Fail();
67 bool ret_value =
true;
69 ret_value = m_opaque_up->Success();
79 err = m_opaque_up->GetError();
90 err_type = m_opaque_up->GetType();
99 m_opaque_up->SetError(err, type);
104 *m_opaque_up = lldb_error;
111 m_opaque_up->SetErrorToErrno();
118 m_opaque_up->SetErrorToGenericError();
125 m_opaque_up->SetErrorString(err_str);
131 va_start(args, format);
132 int num_chars = m_opaque_up->SetErrorStringWithVarArg(format, args);
139 return this->
operator bool();
141 SBError::operator bool()
const {
144 return m_opaque_up !=
nullptr;
148 if (m_opaque_up ==
nullptr)
149 m_opaque_up = std::make_unique<Status>();
170 if (m_opaque_up->Success())
171 description.
Printf(
"success");
173 const char *err_string = GetCString();
174 description.
Printf(
"error: %s",
175 (err_string !=
nullptr ? err_string :
""));
178 description.
Printf(
"error: <NULL>");