Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <error-util.h>
Public Types | |
typedef strings::internal::SubstituteArg | ArgType |
Public Member Functions | |
ErrorMsg () | |
Trivial constructor. More... | |
ErrorMsg (TErrorCode::type error) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4, const ArgType &arg5) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4, const ArgType &arg5, const ArgType &arg6) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4, const ArgType &arg5, const ArgType &arg6, const ArgType &arg7) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4, const ArgType &arg5, const ArgType &arg6, const ArgType &arg7, const ArgType &arg8) | |
ErrorMsg (TErrorCode::type error, const ArgType &arg0, const ArgType &arg1, const ArgType &arg2, const ArgType &arg3, const ArgType &arg4, const ArgType &arg5, const ArgType &arg6, const ArgType &arg7, const ArgType &arg8, const ArgType &arg9) | |
ErrorMsg (TErrorCode::type error, const std::vector< string > &detail) | |
TErrorCode::type | error () const |
void | AddDetail (const std::string &d) |
Add detail string message. More... | |
void | SetError (TErrorCode::type e) |
Set a specific error code. More... | |
const std::string & | msg () const |
Returns the formatted error string. More... | |
const std::vector< std::string > & | details () const |
std::string | GetFullMessageDetails () const |
Static Public Member Functions | |
static ErrorMsg | Init (TErrorCode::type error, const ArgType &arg0=ArgType::NoArg, const ArgType &arg1=ArgType::NoArg, const ArgType &arg2=ArgType::NoArg, const ArgType &arg3=ArgType::NoArg, const ArgType &arg4=ArgType::NoArg, const ArgType &arg5=ArgType::NoArg, const ArgType &arg6=ArgType::NoArg, const ArgType &arg7=ArgType::NoArg, const ArgType &arg8=ArgType::NoArg, const ArgType &arg9=ArgType::NoArg) |
Private Attributes | |
TErrorCode::type | error_ |
std::string | message_ |
std::vector< std::string > | details_ |
Class that holds a formatted error message and potentially a set of detail messages. Error messages are intended to be user facing. Error details can be attached as strings to the message. These details should only be accessed internally.
Definition at line 47 of file error-util.h.
typedef strings::internal::SubstituteArg impala::ErrorMsg::ArgType |
Definition at line 49 of file error-util.h.
|
inline |
Trivial constructor.
Definition at line 52 of file error-util.h.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error | ) |
Below are a set of overloaded constructors taking all possible number of arguments that can be passed to Substitute. The reason is to try to avoid forcing the compiler putting all arguments for Substitute() on the stack whenver this is called and thus polute the instruction cache.
Definition at line 53 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0 | ||
) |
Definition at line 57 of file error-util.cc.
Definition at line 62 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2 | ||
) |
Definition at line 67 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3 | ||
) |
Definition at line 73 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4 | ||
) |
Definition at line 79 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4, | ||
const ArgType & | arg5 | ||
) |
Definition at line 85 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4, | ||
const ArgType & | arg5, | ||
const ArgType & | arg6 | ||
) |
Definition at line 92 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4, | ||
const ArgType & | arg5, | ||
const ArgType & | arg6, | ||
const ArgType & | arg7 | ||
) |
Definition at line 99 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4, | ||
const ArgType & | arg5, | ||
const ArgType & | arg6, | ||
const ArgType & | arg7, | ||
const ArgType & | arg8 | ||
) |
Definition at line 106 of file error-util.cc.
impala::ErrorMsg::ErrorMsg | ( | TErrorCode::type | error, |
const ArgType & | arg0, | ||
const ArgType & | arg1, | ||
const ArgType & | arg2, | ||
const ArgType & | arg3, | ||
const ArgType & | arg4, | ||
const ArgType & | arg5, | ||
const ArgType & | arg6, | ||
const ArgType & | arg7, | ||
const ArgType & | arg8, | ||
const ArgType & | arg9 | ||
) |
Definition at line 114 of file error-util.cc.
|
inline |
Definition at line 85 of file error-util.h.
|
inline |
Add detail string message.
Definition at line 108 of file error-util.h.
References details_.
Referenced by impala::Status::AddDetail(), impala::Status::MergeStatus(), and impala::TEST().
|
inline |
Definition at line 122 of file error-util.h.
References details_.
Referenced by impala::Status::MergeStatus(), and impala::Status::ToThrift().
|
inline |
Definition at line 105 of file error-util.h.
References error_.
Referenced by impala::AppendError(), impala::Status::code(), Init(), impala::Status::IsCancelled(), impala::Status::IsMemLimitExceeded(), impala::Status::IsRecoverableError(), and impala::Status::ToThrift().
|
inline |
Produce a string representation of the error message that includes the formatted message of the original error and the attached detail strings.
Definition at line 128 of file error-util.h.
References details_, and message_.
Referenced by impala::Status::GetDetail(), and impala::TEST().
|
static |
Static initializer that is needed to avoid issues with static initialization order and the point in time when the string list generated via thrift becomes available. This method should not be used if no static initialization is needed as the cost of this method is proportional to the number of entries in the global error message list. WARNING: DO NOT CALL THIS METHOD IN A NON STATIC CONTEXT
Definition at line 122 of file error-util.cc.
|
inline |
Returns the formatted error string.
Definition at line 118 of file error-util.h.
References message_.
Referenced by impala::AppendError(), impala::DataStreamSender::Channel::CloseInternal(), impala::ScalarFnCall::GetUdf(), impala::RuntimeState::LogError(), impala::Status::MergeStatus(), impala::Status::Status(), impala::TEST(), and impala::Status::ToThrift().
|
inline |
|
private |
Definition at line 140 of file error-util.h.
Referenced by AddDetail(), details(), and GetFullMessageDetails().
|
private |
Definition at line 138 of file error-util.h.
Referenced by error(), Init(), and SetError().
|
private |
Definition at line 139 of file error-util.h.
Referenced by GetFullMessageDetails(), Init(), and msg().