15 #ifndef A_UTIL_UTIL_RESULT_IMPL_ERROR_DESCRIPTION_IMPL_HEADER_INCLUDED
16 #define A_UTIL_UTIL_RESULT_IMPL_ERROR_DESCRIPTION_IMPL_HEADER_INCLUDED
23 ErrorDescription::ErrorDescription(std::int32_t error_code,
24 const char* error_description,
28 const char* error_label)
29 : _error_code(error_code),
31 _error_description(error_description),
33 _function_name(function),
34 _error_label(error_label)
68 template <
typename T,
template <
typename = T>
class ResultInfo>
71 return ::a_util::result::ResultInfo<T>::getCode();
74 template <
typename T,
template <
typename = T>
class ResultInfo>
80 template <
typename T,
template <
typename = T>
class ResultInfo>
86 template <
typename T,
template <
typename = T>
class ResultInfo>
92 template <
typename T,
template <
typename = T>
class ResultInfo>
98 template <
typename T,
template <
typename = T>
class ResultInfo>
101 return ::a_util::result::ResultInfo<T>::getLabel();
const char * getFileName() const
Get name of the file the error was reported in.
const char * getFunctionName() const
Get name of the function the error was reported in.
const std::string _file_name
File in which the error occurred.
std::int32_t getLine() const
Get line in source file where the error was reported.
const char * getErrorDescription() const
Get error code as string representation.
const std::string _error_label
Error code as string representation.
const std::int32_t _line_number
Line number in which the error occurred.
std::int32_t getErrorCode() const
Get error code.
const std::string _error_description
Currently held error description.
const std::string _function_name
Function in which the error occurred.
const char * getErrorCodeLabel() const
Get error code label.
const std::int32_t _error_code
Currently held error code.
const char * getFunctionName() const override
Does not provide any useful information in this context.
std::int32_t getErrorCode() const override
Get error code using a_util::result::ResultInfo<T>::getCode()
const char * getErrorCodeLabel() const override
Get error label using a_util::result::ResultInfo<T>::getLabel()
const char * getFileName() const override
Does not provide any useful information in this context.
const char * getErrorDescription() const override
Does not provide any useful information in this context.
std::int32_t getLine() const override
Does not provide any useful information in this context.
Declare the default error description class for Result return values.
Serves as the root component, with common functionality documented in core functionality.
Basic result information template, used by a_util::result::Result.