#include <swcdb/core/Exception.h>
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 | |
Exception & | operator= (const Exception &)=delete |
Exception & | operator= (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) |
Definition at line 21 of file Exception.h.
|
noexcept |
Definition at line 115 of file Exception.cc.
References SWC::Error::BAD_MEMORY_ALLOCATION.
|
noexcept |
Definition at line 151 of file Exception.cc.
|
noexcept |
Definition at line 143 of file Exception.cc.
|
delete |
|
noexcept |
Definition at line 159 of file Exception.cc.
References _prev.
|
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().
|
inlineconstexprnoexcept |
Definition at line 71 of file Exception.h.
References _file.
|
inlineconstexprnoexcept |
Definition at line 66 of file Exception.h.
References _func.
|
inlinenoexcept |
Definition at line 76 of file Exception.h.
References _inner_msg.
|
inlineconstexprnoexcept |
Definition at line 61 of file Exception.h.
References _line.
|
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.
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().
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().
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().
|
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().
|
friend |
Definition at line 86 of file Exception.h.
|
private |
Definition at line 93 of file Exception.h.
Referenced by code(), and print_base().
|
private |
Definition at line 97 of file Exception.h.
Referenced by file(), and print_base().
|
private |
Definition at line 96 of file Exception.h.
Referenced by func(), and print_base().
|
private |
Definition at line 98 of file Exception.h.
Referenced by inner_what(), and print_base().
|
private |
Definition at line 95 of file Exception.h.
Referenced by line(), and print_base().
|
private |
Definition at line 94 of file Exception.h.
Referenced by print_base(), and what().
|
mutableprivate |
Definition at line 99 of file Exception.h.
Referenced by print(), and ~Exception().