diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:58 +0000 |
commit | b76161e41bc2c07cd47f9c61f875d1be95e26d10 (patch) | |
tree | d03c19ce10dec6419f97df1d4dac9d47eb88982f /source/API/SBError.cpp | |
parent | 8b4000f13b303cc154136abc74c55670673e2a96 (diff) |
Notes
Diffstat (limited to 'source/API/SBError.cpp')
-rw-r--r-- | source/API/SBError.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/API/SBError.cpp b/source/API/SBError.cpp index a692a9678cde..b2811d0ac381 100644 --- a/source/API/SBError.cpp +++ b/source/API/SBError.cpp @@ -9,8 +9,8 @@ #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" -#include "lldb/Utility/Error.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/Status.h" #include <stdarg.h> @@ -21,7 +21,7 @@ SBError::SBError() : m_opaque_ap() {} SBError::SBError(const SBError &rhs) : m_opaque_ap() { if (rhs.IsValid()) - m_opaque_ap.reset(new Error(*rhs)); + m_opaque_ap.reset(new Status(*rhs)); } SBError::~SBError() {} @@ -31,7 +31,7 @@ const SBError &SBError::operator=(const SBError &rhs) { if (m_opaque_ap.get()) *m_opaque_ap = *rhs; else - m_opaque_ap.reset(new Error(*rhs)); + m_opaque_ap.reset(new Status(*rhs)); } else m_opaque_ap.reset(); @@ -108,7 +108,7 @@ void SBError::SetError(uint32_t err, ErrorType type) { m_opaque_ap->SetError(err, type); } -void SBError::SetError(const Error &lldb_error) { +void SBError::SetError(const Status &lldb_error) { CreateIfNeeded(); *m_opaque_ap = lldb_error; } @@ -141,19 +141,19 @@ bool SBError::IsValid() const { return m_opaque_ap.get() != NULL; } void SBError::CreateIfNeeded() { if (m_opaque_ap.get() == NULL) - m_opaque_ap.reset(new Error()); + m_opaque_ap.reset(new Status()); } -lldb_private::Error *SBError::operator->() { return m_opaque_ap.get(); } +lldb_private::Status *SBError::operator->() { return m_opaque_ap.get(); } -lldb_private::Error *SBError::get() { return m_opaque_ap.get(); } +lldb_private::Status *SBError::get() { return m_opaque_ap.get(); } -lldb_private::Error &SBError::ref() { +lldb_private::Status &SBError::ref() { CreateIfNeeded(); return *m_opaque_ap; } -const lldb_private::Error &SBError::operator*() const { +const lldb_private::Status &SBError::operator*() const { // Be sure to call "IsValid()" before calling this function or it will crash return *m_opaque_ap; } |