Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::error_results::error_info Struct Reference

#include <http_plugin.hpp>

Collaboration diagram for sysio::error_results::error_info:

Classes

struct  error_detail
 

Public Member Functions

 error_info ()
 
 error_info (const fc::exception &exc, bool include_full_log)
 

Public Attributes

int64_t code {}
 
string name
 
string what
 
vector< error_detaildetails
 

Static Public Attributes

static const uint8_t details_limit = 10
 

Detailed Description

Definition at line 121 of file http_plugin.hpp.

Constructor & Destructor Documentation

◆ error_info() [1/2]

sysio::error_results::error_info::error_info ( )
inline

Definition at line 137 of file http_plugin.hpp.

137{};

◆ error_info() [2/2]

sysio::error_results::error_info::error_info ( const fc::exception & exc,
bool include_full_log )
inline

Definition at line 139 of file http_plugin.hpp.

139 {
140 code = exc.code();
141 name = exc.name();
142 what = exc.what();
143 uint8_t limit = include_full_log ? details_limit : 1;
144 for( auto itr = exc.get_log().begin(); itr != exc.get_log().end(); ++itr ) {
145 // Prevent sending trace that are too big
146 if( details.size() >= limit ) break;
147 // Append error
148 error_detail detail = {
149 include_full_log ? itr->get_message() : itr->get_limited_message(),
150 itr->get_context().get_file(),
151 itr->get_context().get_line_number(),
152 itr->get_context().get_method()
153 };
154 details.emplace_back( detail );
155 }
156 }
const log_messages & get_log() const
int64_t code() const
const char * name() const
const char * what() const noexcept override
unsigned char uint8_t
Definition stdint.h:124
vector< error_detail > details
static const uint8_t details_limit
Here is the call graph for this function:

Member Data Documentation

◆ code

int64_t sysio::error_results::error_info::code {}

Definition at line 122 of file http_plugin.hpp.

122{};

◆ details

vector<error_detail> sysio::error_results::error_info::details

Definition at line 133 of file http_plugin.hpp.

◆ details_limit

const uint8_t sysio::error_results::error_info::details_limit = 10
static

Definition at line 135 of file http_plugin.hpp.

◆ name

string sysio::error_results::error_info::name

Definition at line 123 of file http_plugin.hpp.

◆ what

string sysio::error_results::error_info::what

Definition at line 124 of file http_plugin.hpp.


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