unilink  0.4.3
A simple C++ library for unified async communication
unilink::diagnostics::ErrorInfo Struct Reference

Comprehensive error information structure. More...

#include <error_types.hpp>

Public Member Functions

 ErrorInfo (ErrorLevel l, ErrorCategory c, std::string_view comp, std::string_view op, std::string_view msg)
 Constructor for basic error info. More...
 
 ErrorInfo (ErrorLevel l, ErrorCategory c, std::string_view comp, std::string_view op, std::string_view msg, const boost::system::error_code &ec, bool retry=false)
 Constructor with Boost error code. More...
 
std::string get_timestamp_string () const
 Get formatted timestamp string. More...
 
std::string get_level_string () const
 Get error level as string. More...
 
std::string get_category_string () const
 Get error category as string. More...
 
std::string get_summary () const
 Get formatted error summary. More...
 

Public Attributes

ErrorLevel level
 
ErrorCategory category
 
std::string component
 
std::string operation
 
std::string message
 
boost::system::error_code boost_error
 
std::chrono::system_clock::time_point timestamp
 
bool retryable
 
uint32_t retry_count
 
std::string context
 

Detailed Description

Comprehensive error information structure.

Definition at line 64 of file error_types.hpp.

Constructor & Destructor Documentation

◆ ErrorInfo() [1/2]

unilink::diagnostics::ErrorInfo::ErrorInfo ( ErrorLevel  l,
ErrorCategory  c,
std::string_view  comp,
std::string_view  op,
std::string_view  msg 
)
inline

Constructor for basic error info.

Definition at line 79 of file error_types.hpp.

◆ ErrorInfo() [2/2]

unilink::diagnostics::ErrorInfo::ErrorInfo ( ErrorLevel  l,
ErrorCategory  c,
std::string_view  comp,
std::string_view  op,
std::string_view  msg,
const boost::system::error_code &  ec,
bool  retry = false 
)
inline

Constructor with Boost error code.

Definition at line 92 of file error_types.hpp.

Member Function Documentation

◆ get_category_string()

std::string unilink::diagnostics::ErrorInfo::get_category_string ( ) const
inline

Get error category as string.

Definition at line 144 of file error_types.hpp.

◆ get_level_string()

std::string unilink::diagnostics::ErrorInfo::get_level_string ( ) const
inline

Get error level as string.

Definition at line 127 of file error_types.hpp.

◆ get_summary()

std::string unilink::diagnostics::ErrorInfo::get_summary ( ) const
inline

Get formatted error summary.

Definition at line 165 of file error_types.hpp.

◆ get_timestamp_string()

std::string unilink::diagnostics::ErrorInfo::get_timestamp_string ( ) const
inline

Get formatted timestamp string.

Definition at line 107 of file error_types.hpp.

Member Data Documentation

◆ boost_error

boost::system::error_code unilink::diagnostics::ErrorInfo::boost_error

Definition at line 70 of file error_types.hpp.

◆ category

ErrorCategory unilink::diagnostics::ErrorInfo::category

Definition at line 66 of file error_types.hpp.

◆ component

std::string unilink::diagnostics::ErrorInfo::component

Definition at line 67 of file error_types.hpp.

◆ context

std::string unilink::diagnostics::ErrorInfo::context

Definition at line 74 of file error_types.hpp.

◆ level

ErrorLevel unilink::diagnostics::ErrorInfo::level

Definition at line 65 of file error_types.hpp.

◆ message

std::string unilink::diagnostics::ErrorInfo::message

Definition at line 69 of file error_types.hpp.

◆ operation

std::string unilink::diagnostics::ErrorInfo::operation

Definition at line 68 of file error_types.hpp.

◆ retry_count

uint32_t unilink::diagnostics::ErrorInfo::retry_count

Definition at line 73 of file error_types.hpp.

◆ retryable

bool unilink::diagnostics::ErrorInfo::retryable

Definition at line 72 of file error_types.hpp.

◆ timestamp

std::chrono::system_clock::time_point unilink::diagnostics::ErrorInfo::timestamp

Definition at line 71 of file error_types.hpp.


The documentation for this struct was generated from the following file: