SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Error::Exception Class Referencefinal

#include <swcdb/core/Exception.h>

+ Inheritance diagram for SWC::Error::Exception:
+ Collaboration diagram for SWC::Error::Exception:

Public Member Functions

 Exception (int code, std::string &&msg, Exception *prev=nullptr, int line=0, const char *func=nullptr, const char *file=nullptr, const char *inner_msg=nullptr) noexcept
 
 Exception (Exception &&other) noexcept
 
 Exception (Exception &other) noexcept
 
 Exception (const Exception &)=delete
 
Exceptionoperator= (const Exception &)=delete
 
Exceptionoperator= (Exception &&) noexcept=delete
 
 ~Exception () noexcept
 
constexpr SWC_CAN_INLINE int code () const noexcept
 
virtual SWC_CAN_INLINE const char * what () const noexcept override
 
constexpr SWC_CAN_INLINE int line () const noexcept
 
constexpr SWC_CAN_INLINE const char * func () const noexcept
 
constexpr SWC_CAN_INLINE const char * file () const noexcept
 
SWC_CAN_INLINE const char * inner_what () const noexcept
 
std::string message () const
 
void print (std::ostream &out) const
 
void print_base (std::ostream &out) const
 

Static Public Member Functions

static Exception make (std::exception_ptr &&eptr, std::string &&msg, Exception *prev=nullptr) noexcept
 

Private Attributes

int _code
 
std::string _msg
 
const int _line
 
const char * _func
 
const char * _file
 
std::string _inner_msg
 
const Exception_prev
 

Friends

std::ostream & operator<< (std::ostream &out, const Exception &e)
 

Detailed Description

Definition at line 21 of file Exception.h.

Constructor & Destructor Documentation

◆ Exception() [1/4]

SWC::Error::Exception::Exception ( int  code,
std::string &&  msg,
Exception prev = nullptr,
int  line = 0,
const char *  func = nullptr,
const char *  file = nullptr,
const char *  inner_msg = nullptr 
)
noexcept

Definition at line 115 of file Exception.cc.

References SWC::Error::BAD_MEMORY_ALLOCATION.

◆ Exception() [2/4]

SWC::Error::Exception::Exception ( Exception &&  other)
noexcept

Definition at line 151 of file Exception.cc.

◆ Exception() [3/4]

SWC::Error::Exception::Exception ( Exception other)
noexcept

Definition at line 143 of file Exception.cc.

◆ Exception() [4/4]

SWC::Error::Exception::Exception ( const Exception )
delete

◆ ~Exception()

SWC::Error::Exception::~Exception ( )
noexcept

Definition at line 159 of file Exception.cc.

References _prev.

Member Function Documentation

◆ code()

constexpr SWC_CAN_INLINE int SWC::Error::Exception::code ( ) const
inlineconstexprnoexcept

Definition at line 51 of file Exception.h.

References _code.

Referenced by SWC::Ranger::Block::_scan(), SWC::Comm::Protocol::FsBroker::Handler::append(), SWC::Comm::Protocol::Bkr::Handler::cells_select(), SWC::Comm::Protocol::Bkr::Handler::cells_update(), SWC::Comm::Protocol::Bkr::Params::CellsSelectRsp::CellsSelectRsp(), SWC::Comm::Protocol::Bkr::Params::CellsUpdateRsp::CellsUpdateRsp(), SWC::Comm::Protocol::FsBroker::Handler::close(), SWC::Comm::Protocol::Bkr::Handler::column_compact(), SWC::Comm::Protocol::Mngr::Handler::column_compact(), SWC::Comm::Protocol::Rgr::Handler::column_compact(), SWC::Comm::Protocol::Rgr::Handler::column_delete(), SWC::Comm::Protocol::Bkr::Handler::column_get(), SWC::Comm::Protocol::Mngr::Handler::column_get(), SWC::Comm::Protocol::Bkr::Handler::column_list(), SWC::Comm::Protocol::Mngr::Handler::column_list(), SWC::Comm::Protocol::Bkr::Handler::column_mng(), SWC::Comm::Protocol::Mngr::Handler::column_mng(), SWC::Comm::Protocol::Rgr::Handler::column_update(), SWC::Comm::Protocol::Mngr::Params::ColumnCompactRsp::ColumnCompactRsp(), SWC::Comm::Protocol::Rgr::Params::ColumnCompactRsp::ColumnCompactRsp(), SWC::Comm::Protocol::Rgr::Handler::columns_unload(), SWC::Comm::Protocol::FsBroker::Handler::combi_pread(), SWC::Comm::Protocol::FsBroker::Handler::create(), SWC::Comm::Protocol::FsBroker::Handler::exists(), SWC::Comm::Protocol::FsBroker::Handler::flush(), SWC::client::SQL::Reader::get_schema(), SWC::Comm::Protocol::Bkr::Req::ColumnGet_Base::handle(), SWC::Comm::Protocol::Bkr::Req::ColumnList_Base::handle(), SWC::Comm::Protocol::Mngr::Req::ColumnGet_Base::handle(), SWC::Comm::Protocol::Mngr::Req::ColumnList_Base::handle(), SWC::Comm::Protocol::Mngr::Req::ClusterStatus::handle(), SWC::Comm::Protocol::Mngr::Req::ColumnStatus::handle(), SWC::Comm::Protocol::Mngr::Req::RangersStatus::handle(), SWC::Comm::Protocol::Mngr::Req::ManagersStatus::handle(), SWC::Comm::Protocol::Rgr::Req::ReportRes::handle(), SWC::Comm::Protocol::Rgr::Req::ReportCids::handle(), SWC::Comm::Protocol::Rgr::Req::ReportColumnRids::handle(), SWC::Comm::Protocol::Rgr::Req::ReportColumnsRanges::handle(), SWC::Comm::Protocol::Rgr::Req::ColumnsUnload::handle(), SWC::Comm::Protocol::Rgr::Req::RangeLoad::handle(), SWC::Comm::Protocol::Rgr::Req::RangeUnload::handle(), SWC::Comm::Protocol::Rgr::Req::RangeUnoadForMerge::handle(), SWC::Comm::Protocol::Mngr::Handler::MngrColumnGet::handle(), SWC::Comm::Protocol::Rgr::Req::RangeIsLoaded::handle(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_append(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_create(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_exists(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_length(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_open(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_pread(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_read(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_readdir(), SWC::Comm::Protocol::FsBroker::Req::Base::handle_seek(), SWC::Comm::Protocol::FsBroker::Handler::length(), SWC::Ranger::RangeData::load(), SWC::Comm::ConfigSSL::load_file(), SWC::Ranger::CellStore::Read::make(), SWC::Comm::Protocol::FsBroker::Handler::mkdirs(), SWC::Comm::Protocol::FsBroker::Handler::open(), SWC::Comm::Protocol::Mngr::Handler::ColumnUpdate::operator()(), SWC::Comm::Protocol::Mngr::Handler::MngrState::operator()(), SWC::Comm::Protocol::Mngr::Handler::RangeCreate::operator()(), SWC::Comm::Protocol::Mngr::Handler::RangeRemove::operator()(), SWC::Comm::Protocol::Mngr::Handler::Report::operator()(), SWC::Comm::Protocol::Mngr::Handler::RgrMngId::operator()(), SWC::Comm::Protocol::Mngr::Handler::RgrUpdate::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeLoad::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeLocate::operator()(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), SWC::Comm::Protocol::Rgr::Handler::Report::operator()(), SWC::client::SQL::QuerySelect::parse_dump(), SWC::Comm::Protocol::FsBroker::Handler::pread(), SWC::Comm::Protocol::Rgr::Handler::range_is_loaded(), SWC::Comm::Protocol::Rgr::Handler::range_query_update(), SWC::Comm::Protocol::Rgr::Handler::range_unload(), SWC::Comm::Protocol::Mngr::Handler::range_unloaded(), SWC::Comm::Protocol::Mngr::Params::RangeCreateRsp::RangeCreateRsp(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::RangeLocateRsp(), SWC::Comm::Protocol::Rgr::Params::RangeQuerySelectRsp::RangeQuerySelectRsp(), SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::RangeQueryUpdateRsp(), SWC::Comm::Protocol::Mngr::Params::RangeRemoveRsp::RangeRemoveRsp(), SWC::Comm::Protocol::Mngr::Params::RangeUnloadedRsp::RangeUnloadedRsp(), SWC::Comm::Protocol::FsBroker::Handler::read(), SWC::Comm::Protocol::FsBroker::Handler::read_all(), SWC::Utils::shell::Rgr::read_endpoint(), SWC::Comm::Protocol::FsBroker::Handler::readdir(), SWC::Comm::Protocol::FsBroker::Handler::remove(), SWC::Comm::Protocol::FsBroker::Handler::rename(), SWC::Comm::Event::response_code(), SWC::Comm::Protocol::Mngr::Handler::rgr_get(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::RgrGetRsp(), SWC::Comm::Protocol::FsBroker::Handler::rmdir(), SWC::Comm::Protocol::FsBroker::Handler::seek(), SWC::Comm::Protocol::FsBroker::Handler::sync(), and SWC::Comm::Protocol::FsBroker::Handler::write().

+ Here is the caller graph for this function:

◆ file()

constexpr SWC_CAN_INLINE const char* SWC::Error::Exception::file ( ) const
inlineconstexprnoexcept

Definition at line 71 of file Exception.h.

References _file.

◆ func()

constexpr SWC_CAN_INLINE const char* SWC::Error::Exception::func ( ) const
inlineconstexprnoexcept

Definition at line 66 of file Exception.h.

References _func.

◆ inner_what()

SWC_CAN_INLINE const char* SWC::Error::Exception::inner_what ( ) const
inlinenoexcept

Definition at line 76 of file Exception.h.

References _inner_msg.

◆ line()

constexpr SWC_CAN_INLINE int SWC::Error::Exception::line ( ) const
inlineconstexprnoexcept

Definition at line 61 of file Exception.h.

References _line.

◆ make()

SWC_SHOULD_NOT_INLINE Exception SWC::Error::Exception::make ( std::exception_ptr &&  eptr,
std::string &&  msg,
Exception prev = nullptr 
)
staticnoexcept

Definition at line 27 of file Exception.cc.

References SWC::Error::BAD_CAST, SWC::Error::BAD_FUNCTION, SWC::Error::BAD_LOGIC, SWC::Error::BAD_MEMORY_ALLOCATION, SWC::Error::BAD_POINTER, SWC::Error::BAD_REGEXP, SWC::Thrift::Converter::exception(), SWC::Error::EXCEPTION_BAD, SWC::Error::EXCEPTION_UNKNOWN, SWC::Error::IO_ERROR, and SWC_ERRNO_FUTURE_BEGIN.

+ Here is the call graph for this function:

◆ message()

std::string SWC::Error::Exception::message ( ) const

Definition at line 163 of file Exception.cc.

References print().

Referenced by SWC::DB::Cells::TSV::FileReader::read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

Exception& SWC::Error::Exception::operator= ( const Exception )
delete

◆ operator=() [2/2]

Exception& SWC::Error::Exception::operator= ( Exception &&  )
deletenoexcept

◆ print()

SWC_SHOULD_NOT_INLINE void SWC::Error::Exception::print ( std::ostream &  out) const

Definition at line 170 of file Exception.cc.

References _prev, and print_base().

Referenced by SWC::Ranger::Block::load_cells(), and message().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_base()

void SWC::Error::Exception::print_base ( std::ostream &  out) const

Definition at line 177 of file Exception.cc.

References _code, _file, _func, _inner_msg, _line, _msg, SWC::Error::get_text(), and SWC::Core::logger.

Referenced by print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ what()

virtual SWC_CAN_INLINE const char* SWC::Error::Exception::what ( ) const
inlineoverridevirtualnoexcept

Definition at line 56 of file Exception.h.

References _msg.

Referenced by SWC::client::SQL::QuerySelect::parse_dump(), and SWC::Utils::shell::Rgr::read_endpoint().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Exception e 
)
friend

Definition at line 86 of file Exception.h.

Member Data Documentation

◆ _code

int SWC::Error::Exception::_code
private

Definition at line 93 of file Exception.h.

Referenced by code(), and print_base().

◆ _file

const char* SWC::Error::Exception::_file
private

Definition at line 97 of file Exception.h.

Referenced by file(), and print_base().

◆ _func

const char* SWC::Error::Exception::_func
private

Definition at line 96 of file Exception.h.

Referenced by func(), and print_base().

◆ _inner_msg

std::string SWC::Error::Exception::_inner_msg
private

Definition at line 98 of file Exception.h.

Referenced by inner_what(), and print_base().

◆ _line

const int SWC::Error::Exception::_line
private

Definition at line 95 of file Exception.h.

Referenced by line(), and print_base().

◆ _msg

std::string SWC::Error::Exception::_msg
private

Definition at line 94 of file Exception.h.

Referenced by print_base(), and what().

◆ _prev

const Exception* SWC::Error::Exception::_prev
mutableprivate

Definition at line 99 of file Exception.h.

Referenced by print(), and ~Exception().


The documentation for this class was generated from the following files: