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 Namespace Reference

The SWC-DB Error C++ namespace 'SWC::Error'. More...

Classes

class  Exception
 

Enumerations

enum  Code : int32_t {
  EXCEPTION_BAD = -4,
  EXCEPTION_UNKNOWN = -3,
  UNPOSSIBLE = -2,
  FAILED_EXPECTATION = -1,
  OK = 0,
  IO_ERROR = SWC_ERRNO_APP_BEGIN + 0,
  BAD_MEMORY_ALLOCATION = SWC_ERRNO_APP_BEGIN + 1,
  BAD_FUNCTION = SWC_ERRNO_APP_BEGIN + 2,
  BAD_POINTER = SWC_ERRNO_APP_BEGIN + 3,
  BAD_CAST = SWC_ERRNO_APP_BEGIN + 4,
  BAD_FORMAT = SWC_ERRNO_APP_BEGIN + 5,
  BAD_REGEXP = SWC_ERRNO_APP_BEGIN + 6,
  BAD_LOGIC = SWC_ERRNO_APP_BEGIN + 7,
  CANCELLED = SWC_ERRNO_APP_BEGIN + 8,
  NOT_ALLOWED = SWC_ERRNO_APP_BEGIN + 9,
  INVALID_ARGUMENT = SWC_ERRNO_APP_BEGIN + 10,
  INCOMPATIBLE_OPTIONS = SWC_ERRNO_APP_BEGIN + 11,
  SERIALIZATION_INPUT_OVERRUN = SWC_ERRNO_APP_BEGIN + 12,
  CHECKSUM_MISMATCH = SWC_ERRNO_APP_BEGIN + 13,
  COMM_NOT_CONNECTED = SWC_ERRNO_APP_BEGIN + 14,
  COMM_CONNECT_ERROR = SWC_ERRNO_APP_BEGIN + 15,
  COMM_SEND_ERROR = SWC_ERRNO_APP_BEGIN + 16,
  COMM_HEADER_CHECKSUM_MISMATCH = SWC_ERRNO_APP_BEGIN + 17,
  COMM_BAD_HEADER = SWC_ERRNO_APP_BEGIN + 18,
  PROTOCOL_ERROR = SWC_ERRNO_APP_BEGIN + 19,
  REQUEST_TRUNCATED_HEADER = SWC_ERRNO_APP_BEGIN + 20,
  REQUEST_TRUNCATED_PAYLOAD = SWC_ERRNO_APP_BEGIN + 21,
  REQUEST_TIMEOUT = SWC_ERRNO_APP_BEGIN + 22,
  NOT_IMPLEMENTED = SWC_ERRNO_APP_BEGIN + 23,
  ENCODER_ENCODE = SWC_ERRNO_APP_BEGIN + 24,
  ENCODER_DECODE = SWC_ERRNO_APP_BEGIN + 25,
  CONFIG_BAD_CFG_FILE = SWC_ERRNO_APP_BEGIN + 26,
  CONFIG_GET_ERROR = SWC_ERRNO_APP_BEGIN + 27,
  CONFIG_BAD_VALUE = SWC_ERRNO_APP_BEGIN + 28,
  SERVER_NOT_READY = SWC_ERRNO_APP_BEGIN + 29,
  SERVER_SHUTTING_DOWN = SWC_ERRNO_APP_BEGIN + 30,
  SERVER_MEMORY_LOW = SWC_ERRNO_APP_BEGIN + 31,
  MNGR_NOT_ACTIVE = SWC_ERRNO_APP_BEGIN + 32,
  MNGR_NOT_INITIALIZED = SWC_ERRNO_APP_BEGIN + 33,
  RGR_NOT_READY = SWC_ERRNO_APP_BEGIN + 34,
  RGR_NOT_LOADED_RANGE = SWC_ERRNO_APP_BEGIN + 35,
  RGR_DELETED_RANGE = SWC_ERRNO_APP_BEGIN + 36,
  FS_BAD_FILE_HANDLE = SWC_ERRNO_APP_BEGIN + 37,
  FS_PERMISSION_DENIED = SWC_ERRNO_APP_BEGIN + 38,
  FS_EOF = SWC_ERRNO_APP_BEGIN + 39,
  FS_PATH_NOT_FOUND = SWC_ERRNO_APP_BEGIN + 40,
  COLUMN_NOT_READY = SWC_ERRNO_APP_BEGIN + 41,
  COLUMN_NOT_EXISTS = SWC_ERRNO_APP_BEGIN + 42,
  COLUMN_REACHED_ID_LIMIT = SWC_ERRNO_APP_BEGIN + 43,
  COLUMN_MARKED_REMOVED = SWC_ERRNO_APP_BEGIN + 44,
  COLUMN_UNKNOWN_GET_FLAG = SWC_ERRNO_APP_BEGIN + 45,
  COLUMN_SCHEMA_NAME_EXISTS = SWC_ERRNO_APP_BEGIN + 46,
  COLUMN_SCHEMA_NAME_NOT_EXISTS = SWC_ERRNO_APP_BEGIN + 47,
  COLUMN_SCHEMA_BAD_SAVE = SWC_ERRNO_APP_BEGIN + 48,
  COLUMN_SCHEMA_NAME_EMPTY = SWC_ERRNO_APP_BEGIN + 49,
  COLUMN_SCHEMA_NAME_NOT_CORRES = SWC_ERRNO_APP_BEGIN + 50,
  COLUMN_SCHEMA_ID_EMPTY = SWC_ERRNO_APP_BEGIN + 51,
  COLUMN_SCHEMA_ID_EXISTS = SWC_ERRNO_APP_BEGIN + 52,
  COLUMN_SCHEMA_NOT_DIFFERENT = SWC_ERRNO_APP_BEGIN + 53,
  COLUMN_SCHEMA_MISSING = SWC_ERRNO_APP_BEGIN + 54,
  COLUMN_SCHEMA_IS_SYSTEM = SWC_ERRNO_APP_BEGIN + 55,
  COLUMN_CHANGE_INCOMPATIBLE = SWC_ERRNO_APP_BEGIN + 56,
  RANGE_NOT_FOUND = SWC_ERRNO_APP_BEGIN + 57,
  RANGE_CELLSTORES = SWC_ERRNO_APP_BEGIN + 58,
  RANGE_COMMITLOG = SWC_ERRNO_APP_BEGIN + 59,
  RANGE_BAD_INTERVAL = SWC_ERRNO_APP_BEGIN + 60,
  RANGE_BAD_CELLS_INPUT = SWC_ERRNO_APP_BEGIN + 61,
  SQL_PARSE_ERROR = SWC_ERRNO_APP_BEGIN + 62,
  SQL_BAD_LOAD_FILE_FORMAT = SWC_ERRNO_APP_BEGIN + 63,
  CLIENT_DATA_REMAINED = SWC_ERRNO_APP_BEGIN + 64,
  CLIENT_MISMATCHED_CID = SWC_ERRNO_APP_BEGIN + 65,
  CLIENT_STOPPING = SWC_ERRNO_APP_BEGIN + 66
}
 

Functions

const char * get_text (const int err) noexcept
 
void print (std::ostream &out, int err)
 

Detailed Description

The SWC-DB Error C++ namespace 'SWC::Error'.

Enumeration Type Documentation

◆ Code

enum SWC::Error::Code : int32_t
Enumerator
EXCEPTION_BAD 
EXCEPTION_UNKNOWN 
UNPOSSIBLE 
FAILED_EXPECTATION 
OK 
IO_ERROR 
BAD_MEMORY_ALLOCATION 
BAD_FUNCTION 
BAD_POINTER 
BAD_CAST 
BAD_FORMAT 
BAD_REGEXP 
BAD_LOGIC 
CANCELLED 
NOT_ALLOWED 
INVALID_ARGUMENT 
INCOMPATIBLE_OPTIONS 
SERIALIZATION_INPUT_OVERRUN 
CHECKSUM_MISMATCH 
COMM_NOT_CONNECTED 
COMM_CONNECT_ERROR 
COMM_SEND_ERROR 
COMM_HEADER_CHECKSUM_MISMATCH 
COMM_BAD_HEADER 
PROTOCOL_ERROR 
REQUEST_TRUNCATED_HEADER 
REQUEST_TRUNCATED_PAYLOAD 
REQUEST_TIMEOUT 
NOT_IMPLEMENTED 
ENCODER_ENCODE 
ENCODER_DECODE 
CONFIG_BAD_CFG_FILE 
CONFIG_GET_ERROR 
CONFIG_BAD_VALUE 
SERVER_NOT_READY 
SERVER_SHUTTING_DOWN 
SERVER_MEMORY_LOW 
MNGR_NOT_ACTIVE 
MNGR_NOT_INITIALIZED 
RGR_NOT_READY 
RGR_NOT_LOADED_RANGE 
RGR_DELETED_RANGE 
FS_BAD_FILE_HANDLE 
FS_PERMISSION_DENIED 
FS_EOF 
FS_PATH_NOT_FOUND 
COLUMN_NOT_READY 
COLUMN_NOT_EXISTS 
COLUMN_REACHED_ID_LIMIT 
COLUMN_MARKED_REMOVED 
COLUMN_UNKNOWN_GET_FLAG 
COLUMN_SCHEMA_NAME_EXISTS 
COLUMN_SCHEMA_NAME_NOT_EXISTS 
COLUMN_SCHEMA_BAD_SAVE 
COLUMN_SCHEMA_NAME_EMPTY 
COLUMN_SCHEMA_NAME_NOT_CORRES 
COLUMN_SCHEMA_ID_EMPTY 
COLUMN_SCHEMA_ID_EXISTS 
COLUMN_SCHEMA_NOT_DIFFERENT 
COLUMN_SCHEMA_MISSING 
COLUMN_SCHEMA_IS_SYSTEM 
COLUMN_CHANGE_INCOMPATIBLE 
RANGE_NOT_FOUND 
RANGE_CELLSTORES 
RANGE_COMMITLOG 
RANGE_BAD_INTERVAL 
RANGE_BAD_CELLS_INPUT 
SQL_PARSE_ERROR 
SQL_BAD_LOAD_FILE_FORMAT 
CLIENT_DATA_REMAINED 
CLIENT_MISMATCHED_CID 
CLIENT_STOPPING 

Definition at line 38 of file Error.h.

Function Documentation

◆ get_text()

SWC_SHOULD_NOT_INLINE const char * SWC::Error::get_text ( const int  err)
noexcept

Definition at line 173 of file Error.cc.

References SWC_ERRNO_APP_BEGIN, SWC_ERRNO_APP_END, SWC_ERRNO_EAI_BEGIN, SWC_ERRNO_EAI_END, SWC_ERRNO_FUTURE_BEGIN, SWC_ERRNO_FUTURE_END, and SWC_ERRNO_SYS_END.

Referenced by SWC::Ranger::Callback::RangeUnloadInternal::ReqData::callback(), SWC::Ranger::Range::check_meta(), SWC::FS::Interface::close(), SWC::Utils::shell::Mngr::cluster_status(), SWC::Utils::shell::Mngr::column_status(), SWC::Core::LogWriter::daemon(), SWC::Utils::shell::Interface::error(), SWC::client::SQL::Reader::error_msg(), SWC::Thrift::Converter::exception(), SWC::FS::Interface::exists(), SWC::Manager::ColumnHealthCheck::RangerCheck::handle(), SWC::FS::FileSystemCeph::initialize(), SWC::Manager::MngdColumns::initialize(), SWC::FS::FileSystemHadoopJVM::initialize(), SWC::Ranger::Range::internal_unload(), SWC::Comm::Protocol::FsBroker::Req::Base::is_rsp(), SWC::FS::Interface::length(), SWC::Comm::ConfigSSL::load_file(), SWC::Utils::shell::Mngr::managers_status(), SWC::FS::Interface::mkdirs(), SWC::Ranger::RangeSplit::mngr_create_range(), SWC::Ranger::CompactRange::mngr_create_range(), SWC::Ranger::mngr_remove_range(), print(), SWC::Error::Exception::print_base(), SWC::Utils::LoadGenerator::quit_error(), SWC::Utils::shell::Mngr::rangers_status(), SWC::FS::Interface::read(), SWC::client::SQL::Reader::read_ts_and_value(), SWC::FS::Interface::readdir(), SWC::Manager::MngdColumns::remove(), SWC::FS::Interface::remove(), SWC::FS::Interface::rename(), SWC::Utils::shell::Rgr::report(), SWC::Utils::shell::Rgr::report_resources(), SWC::FS::Interface::rmdir(), SWC::Ranger::RangeSplit::run(), SWC::Utils::shell::Interface::run(), SWC::Comm::ConfigSSL::set_networks(), SWC::Ranger::CompactRange::split(), SWC::Comm::Protocol::Mngr::Params::ColumnCompactRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeCreateRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeRemoveRsp::to_string(), SWC::Comm::Protocol::Mngr::Params::RangeUnloadedRsp::to_string(), SWC::Comm::Protocol::Rgr::Params::ColumnCompactRsp::to_string(), and SWC::FS::Interface::write().

+ Here is the caller graph for this function:

◆ print()

SWC_SHOULD_NOT_INLINE void SWC::Error::print ( std::ostream &  out,
int  err 
)

Definition at line 191 of file Error.cc.

References get_text().

Referenced by SWC::DB::Schemas::_add(), SWC::Ranger::CommitLog::Fragments::_commit(), SWC::Ranger::CommitLog::Compact::Group::_loaded(), SWC::Manager::MngdColumns::create_schemas_store(), 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::Config::Settings::init(), SWC::Manager::MngdColumns::initialize(), SWC::Ranger::CompactRange::initialize(), SWC::Ranger::CellStore::Read::load_blocks_index(), SWC::Ranger::CellStore::Block::Read::load_finish(), SWC::Ranger::CommitLog::Fragment::load_finish(), SWC::Ranger::CellStore::Block::Read::load_header(), SWC::Ranger::CommitLog::Fragment::load_header(), SWC::Ranger::CellStore::Block::Read::load_open(), SWC::Ranger::CommitLog::Fragment::load_read(), SWC::Ranger::CellStore::Read::load_trailer(), SWC::Ranger::CommitLog::Splitter::loaded(), SWC::Ranger::Callback::RangeLoad::loaded(), SWC::Comm::Protocol::Rgr::Req::RangeLoad::loaded(), SWC::Ranger::Range::loaded(), SWC::Ranger::CellStore::Read::make(), SWC::Comm::Protocol::Rgr::Handler::RangeLocate::operator()(), SWC::Comm::Protocol::Mngr::Params::ColumnUpdate::print(), SWC::Ranger::CellStore::Block::Read::print(), SWC::Ranger::CommitLog::Fragment::print(), SWC::Comm::Event::print(), SWC::Comm::Protocol::Bkr::Params::CellsSelectRsp::print(), SWC::Comm::Protocol::Bkr::Params::CellsUpdateRsp::print(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::print(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::print(), SWC::Comm::Protocol::Rgr::Params::RangeQuerySelectRsp::print(), SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::print(), SWC::Manager::Rangers::range_loaded(), SWC::Ranger::Callback::RangeQuerySelect::response(), SWC::Ranger::CompactRange::response(), SWC::Comm::Protocol::Bkr::Handler::Selector::response(), SWC::Comm::Protocol::Bkr::Handler::Updater::response(), SWC::client::Query::Update::Handlers::Metric::Reporting::response(), SWC::Manager::MngdColumns::update_status_ack(), and SWC::Ranger::CommitLog::Fragment::write().

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