18 #ifndef FOEDUS_FIXED_ERROR_STACK_HPP_
19 #define FOEDUS_FIXED_ERROR_STACK_HPP_
73 return linenums_[stack_index];
79 return filenames_[stack_index];
83 const FixedFuncName&
get_func(uint16_t stack_index)
const {
85 return funcs_[stack_index];
89 void output(std::ostream* ptr)
const;
116 FixedErrorMessage custom_message_;
125 uint16_t stack_depth_;
129 #endif // FOEDUS_FIXED_ERROR_STACK_HPP_
FixedErrorStack(const ErrorStack &src)
Copy the content of the given ErrorStack.
const FixedFuncName & get_func(uint16_t stack_index) const
Returns the function name of the given stack position.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint16_t get_stack_depth() const
Returns the depth of stack this error code has collected.
Brings error stacktrace information as return value of functions.
assorted::FixedString< 124 > FixedFileName
FixedErrorStack()
Empty constructor.
bool is_error() const
Returns if this return code is not kErrorCodeOk.
assorted::FixedString< 508 > FixedErrorMessage
FixedErrorStack & operator=(const ErrorStack &src)
Assignment operator.
assorted::FixedString< 124 > FixedFuncName
ErrorStack to_error_stack() const
Instantiates an ErrorStack object based on this object.
void output(std::ostream *ptr) const
Describe this object to the given stream.
Maximum stack trace depth.
const char * get_message() const
Returns the error message inferred by the error code.
Representation of ErrorStack that can be copied to other processes and even serialized to files...
friend std::ostream & operator<<(std::ostream &o, const FixedErrorStack &obj)
const FixedFileName & get_filename(uint16_t stack_index) const
Returns the file name of the given stack position.
uint32_t get_linenum(uint16_t stack_index) const
Returns the line number of the given stack position.
const char * get_error_message(ErrorCode code)
Returns the error messages corresponding to ErrorCode enum defined in error_code.xmacro.
ErrorCode get_error_code() const
Return the integer error code.
const FixedErrorMessage & get_custom_message() const
Returns the custom error message.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
void from_error_stack(const ErrorStack &other)
Convert ErrorStack to this object.
ErrorCode
Enum of error codes defined in error_code.xmacro.