diff options
Diffstat (limited to 'lldb/source/Utility/Error.cpp')
-rw-r--r-- | lldb/source/Utility/Error.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Utility/Error.cpp b/lldb/source/Utility/Error.cpp index 32f60b39729..01f933141f0 100644 --- a/lldb/source/Utility/Error.cpp +++ b/lldb/source/Utility/Error.cpp @@ -15,6 +15,7 @@ // C++ Includes #include <cerrno> #include <cstdarg> +#include <system_error> // Other libraries and framework includes #include "llvm/ADT/SmallVector.h" @@ -31,6 +32,10 @@ Error::Error() : m_code(0), m_type(eErrorTypeInvalid), m_string() {} Error::Error(ValueType err, ErrorType type) : m_code(err), m_type(type), m_string() {} +Error::Error(std::error_code EC) + : m_code(EC.value()), m_type(ErrorType::eErrorTypeGeneric), + m_string(EC.message()) {} + Error::Error(const Error &rhs) = default; Error::Error(const char *format, ...) |