0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Enumerations | Functions
Error.h File Reference

Error codes, Exception handling, error logging. More...

#include "Common/String.h"
#include <ostream>
#include <stdexcept>
Include dependency graph for Error.h:

Go to the source code of this file.

Classes

struct  Hypertable::ExceptionMessageRenderer
 Helper class to render an exception message a la IO manipulators. More...
 
struct  Hypertable::ExceptionMessagesRenderer
 Helper class to render an exception message a la IO manipulators. More...
 
class  Hypertable::Exception
 This is a generic exception class for Hypertable. More...
 

Namespaces

 Hypertable
 Hypertable definitions
 
 Hypertable::Error
 

Macros

#define HT_EXCEPTION(_code_, _msg_)   Exception(_code_, _msg_, __LINE__, HT_FUNC, __FILE__)
 
#define HT_EXCEPTION2(_code_, _ex_, _msg_)   Exception(_code_, _msg_, _ex_, __LINE__, HT_FUNC, __FILE__)
 
#define HT_THROW(_code_, _msg_)   throw HT_EXCEPTION(_code_, _msg_)
 
#define HT_THROW_(_code_)   HT_THROW(_code_, "")
 
#define HT_THROW2(_code_, _ex_, _msg_)   throw HT_EXCEPTION2(_code_, _ex_, _msg_)
 
#define HT_THROW2_(_code_, _ex_)   HT_THROW2(_code_, _ex_, "")
 
#define HT_THROWF(_code_, _fmt_,...)   throw HT_EXCEPTION(_code_, Hypertable::format(_fmt_, __VA_ARGS__))
 
#define HT_THROW2F(_code_, _ex_, _fmt_,...)   throw HT_EXCEPTION2(_code_, _ex_, Hypertable::format(_fmt_, __VA_ARGS__))
 
#define HT_RETHROWF(_fmt_,...)
 
#define HT_RETHROW(_s_)   HT_RETHROWF("%s", _s_)
 
#define HT_TRY(_s_, _code_)
 
#define HT_LOG_EXCEPTION(_s_)
 
#define HT_TRY_OR_LOG(_s_, _code_)
 

Enumerations

enum  Hypertable::Error::Code {
  Hypertable::Error::UNPOSSIBLE = -3, Hypertable::Error::EXTERNAL = -2, Hypertable::Error::FAILED_EXPECTATION = -1, Hypertable::Error::OK = 0,
  Hypertable::Error::PROTOCOL_ERROR = 1, Hypertable::Error::REQUEST_TRUNCATED = 2, Hypertable::Error::RESPONSE_TRUNCATED = 3, Hypertable::Error::REQUEST_TIMEOUT = 4,
  Hypertable::Error::LOCAL_IO_ERROR = 5, Hypertable::Error::BAD_ROOT_LOCATION = 6, Hypertable::Error::BAD_SCHEMA = 7, Hypertable::Error::INVALID_METADATA = 8,
  Hypertable::Error::BAD_KEY = 9, Hypertable::Error::METADATA_NOT_FOUND = 10, Hypertable::Error::HQL_PARSE_ERROR = 11, Hypertable::Error::FILE_NOT_FOUND = 12,
  Hypertable::Error::BLOCK_COMPRESSOR_UNSUPPORTED_TYPE = 13, Hypertable::Error::BLOCK_COMPRESSOR_INVALID_ARG = 14, Hypertable::Error::BLOCK_COMPRESSOR_TRUNCATED = 15, Hypertable::Error::BLOCK_COMPRESSOR_BAD_HEADER = 16,
  Hypertable::Error::BLOCK_COMPRESSOR_BAD_MAGIC = 17, Hypertable::Error::BLOCK_COMPRESSOR_CHECKSUM_MISMATCH = 18, Hypertable::Error::BLOCK_COMPRESSOR_DEFLATE_ERROR = 19, Hypertable::Error::BLOCK_COMPRESSOR_INFLATE_ERROR = 20,
  Hypertable::Error::BLOCK_COMPRESSOR_INIT_ERROR = 21, Hypertable::Error::TABLE_NOT_FOUND = 22, Hypertable::Error::MALFORMED_REQUEST = 23, Hypertable::Error::TOO_MANY_COLUMNS = 24,
  Hypertable::Error::BAD_DOMAIN_NAME = 25, Hypertable::Error::COMMAND_PARSE_ERROR = 26, Hypertable::Error::CONNECT_ERROR_MASTER = 27, Hypertable::Error::CONNECT_ERROR_HYPERSPACE = 28,
  Hypertable::Error::BAD_MEMORY_ALLOCATION = 29, Hypertable::Error::BAD_SCAN_SPEC = 30, Hypertable::Error::NOT_IMPLEMENTED = 31, Hypertable::Error::VERSION_MISMATCH = 32,
  Hypertable::Error::CANCELLED = 33, Hypertable::Error::SCHEMA_PARSE_ERROR = 34, Hypertable::Error::SYNTAX_ERROR = 35, Hypertable::Error::DOUBLE_UNGET = 36,
  Hypertable::Error::EMPTY_BLOOMFILTER = 37, Hypertable::Error::BLOOMFILTER_CHECKSUM_MISMATCH = 38, Hypertable::Error::NAME_ALREADY_IN_USE = 39, Hypertable::Error::NAMESPACE_DOES_NOT_EXIST = 40,
  Hypertable::Error::BAD_NAMESPACE = 41, Hypertable::Error::NAMESPACE_EXISTS = 42, Hypertable::Error::NO_RESPONSE = 43, Hypertable::Error::NOT_ALLOWED = 44,
  Hypertable::Error::INDUCED_FAILURE = 45, Hypertable::Error::SERVER_SHUTTING_DOWN = 46, Hypertable::Error::LOCATION_UNASSIGNED = 47, Hypertable::Error::ALREADY_EXISTS = 48,
  Hypertable::Error::CHECKSUM_MISMATCH = 49, Hypertable::Error::CLOSED = 50, Hypertable::Error::RANGESERVER_NOT_FOUND = 51, Hypertable::Error::CONNECTION_NOT_INITIALIZED = 52,
  Hypertable::Error::DUPLICATE_RANGE = 53, Hypertable::Error::INVALID_PSEUDO_TABLE_NAME = 54, Hypertable::Error::BAD_FORMAT = 55, Hypertable::Error::INVALID_ARGUMENT = 56,
  Hypertable::Error::INVALID_OPERATION = 57, Hypertable::Error::UNSUPPORTED_OPERATION = 58, Hypertable::Error::COLUMN_FAMILY_NOT_FOUND = 59, Hypertable::Error::NOTHING_TO_DO = 60,
  Hypertable::Error::INCOMPATIBLE_OPTIONS = 61, Hypertable::Error::BAD_VALUE = 62, Hypertable::Error::SCHEMA_GENERATION_MISMATCH = 63, Hypertable::Error::INVALID_METHOD_IDENTIFIER = 64,
  Hypertable::Error::SERVER_NOT_READY = 65, Hypertable::Error::CONFIG_BAD_ARGUMENT = 1001, Hypertable::Error::CONFIG_BAD_CFG_FILE = 1002, Hypertable::Error::CONFIG_GET_ERROR = 1003,
  Hypertable::Error::CONFIG_BAD_VALUE = 1004, Hypertable::Error::COMM_NOT_CONNECTED = 0x00010001, Hypertable::Error::COMM_BROKEN_CONNECTION = 0x00010002, Hypertable::Error::COMM_CONNECT_ERROR = 0x00010003,
  Hypertable::Error::COMM_ALREADY_CONNECTED = 0x00010004, Hypertable::Error::COMM_SEND_ERROR = 0x00010006, Hypertable::Error::COMM_RECEIVE_ERROR = 0x00010007, Hypertable::Error::COMM_POLL_ERROR = 0x00010008,
  Hypertable::Error::COMM_CONFLICTING_ADDRESS = 0x00010009, Hypertable::Error::COMM_SOCKET_ERROR = 0x0001000A, Hypertable::Error::COMM_BIND_ERROR = 0x0001000B, Hypertable::Error::COMM_LISTEN_ERROR = 0x0001000C,
  Hypertable::Error::COMM_HEADER_CHECKSUM_MISMATCH = 0x0001000D, Hypertable::Error::COMM_PAYLOAD_CHECKSUM_MISMATCH = 0x0001000E, Hypertable::Error::COMM_BAD_HEADER = 0x0001000F, Hypertable::Error::COMM_INVALID_PROXY = 0x00010010,
  Hypertable::Error::FSBROKER_BAD_FILE_HANDLE = 0x00020001, Hypertable::Error::FSBROKER_IO_ERROR = 0x00020002, Hypertable::Error::FSBROKER_FILE_NOT_FOUND = 0x00020003, Hypertable::Error::FSBROKER_BAD_FILENAME = 0x00020004,
  Hypertable::Error::FSBROKER_PERMISSION_DENIED = 0x00020005, Hypertable::Error::FSBROKER_INVALID_ARGUMENT = 0x00020006, Hypertable::Error::FSBROKER_INVALID_CONFIG = 0x00020007, Hypertable::Error::FSBROKER_EOF = 0x00020008,
  Hypertable::Error::HYPERSPACE_IO_ERROR = 0x00030001, Hypertable::Error::HYPERSPACE_CREATE_FAILED = 0x00030002, Hypertable::Error::HYPERSPACE_FILE_NOT_FOUND = 0x00030003, Hypertable::Error::HYPERSPACE_ATTR_NOT_FOUND = 0x00030004,
  Hypertable::Error::HYPERSPACE_DELETE_ERROR = 0x00030005, Hypertable::Error::HYPERSPACE_BAD_PATHNAME = 0x00030006, Hypertable::Error::HYPERSPACE_PERMISSION_DENIED = 0x00030007, Hypertable::Error::HYPERSPACE_EXPIRED_SESSION = 0x00030008,
  Hypertable::Error::HYPERSPACE_FILE_EXISTS = 0x00030009, Hypertable::Error::HYPERSPACE_IS_DIRECTORY = 0x0003000A, Hypertable::Error::HYPERSPACE_INVALID_HANDLE = 0x0003000B, Hypertable::Error::HYPERSPACE_REQUEST_CANCELLED = 0x0003000C,
  Hypertable::Error::HYPERSPACE_MODE_RESTRICTION = 0x0003000D, Hypertable::Error::HYPERSPACE_ALREADY_LOCKED = 0x0003000E, Hypertable::Error::HYPERSPACE_LOCK_CONFLICT = 0x0003000F, Hypertable::Error::HYPERSPACE_NOT_LOCKED = 0x00030010,
  Hypertable::Error::HYPERSPACE_BAD_ATTRIBUTE = 0x00030011, Hypertable::Error::HYPERSPACE_BERKELEYDB_ERROR = 0x00030012, Hypertable::Error::HYPERSPACE_DIR_NOT_EMPTY = 0x00030013, Hypertable::Error::HYPERSPACE_BERKELEYDB_DEADLOCK = 0x00030014,
  Hypertable::Error::HYPERSPACE_BERKELEYDB_REP_HANDLE_DEAD = 0x00030015, Hypertable::Error::HYPERSPACE_FILE_OPEN = 0x00030016, Hypertable::Error::HYPERSPACE_CLI_PARSE_ERROR = 0x00030017, Hypertable::Error::HYPERSPACE_CREATE_SESSION_FAILED = 0x00030018,
  Hypertable::Error::HYPERSPACE_NOT_MASTER_LOCATION = 0x00030019, Hypertable::Error::HYPERSPACE_STATEDB_ERROR = 0x0003001A, Hypertable::Error::HYPERSPACE_STATEDB_DEADLOCK = 0x0003001B, Hypertable::Error::HYPERSPACE_STATEDB_BAD_KEY = 0x0003001C,
  Hypertable::Error::HYPERSPACE_STATEDB_BAD_VALUE = 0x0003001D, Hypertable::Error::HYPERSPACE_STATEDB_ALREADY_DELETED = 0x0003001E, Hypertable::Error::HYPERSPACE_STATEDB_EVENT_EXISTS = 0x0003001F, Hypertable::Error::HYPERSPACE_STATEDB_EVENT_NOT_EXISTS = 0x00030020,
  Hypertable::Error::HYPERSPACE_STATEDB_EVENT_ATTR_NOT_FOUND = 0x00030021, Hypertable::Error::HYPERSPACE_STATEDB_SESSION_EXISTS = 0x00030022, Hypertable::Error::HYPERSPACE_STATEDB_SESSION_NOT_EXISTS = 0x00030023, Hypertable::Error::HYPERSPACE_STATEDB_SESSION_ATTR_NOT_FOUND = 0x00030024,
  Hypertable::Error::HYPERSPACE_STATEDB_HANDLE_EXISTS = 0x00030025, Hypertable::Error::HYPERSPACE_STATEDB_HANDLE_NOT_EXISTS = 0x00030026, Hypertable::Error::HYPERSPACE_STATEDB_HANDLE_ATTR_NOT_FOUND = 0x00030027, Hypertable::Error::HYPERSPACE_STATEDB_NODE_EXISTS = 0x00030028,
  Hypertable::Error::HYPERSPACE_STATEDB_NODE_NOT_EXISTS = 0x00030029, Hypertable::Error::HYPERSPACE_STATEDB_NODE_ATTR_NOT_FOUND = 0x0003002A, Hypertable::Error::HYPERSPACE_VERSION_MISMATCH = 0x00030030, Hypertable::Error::MASTER_TABLE_EXISTS = 0x00040001,
  Hypertable::Error::MASTER_BAD_SCHEMA = 0x00040002, Hypertable::Error::MASTER_NOT_RUNNING = 0x00040003, Hypertable::Error::MASTER_NO_RANGESERVERS = 0x00040004, Hypertable::Error::MASTER_FILE_NOT_LOCKED = 0x00040005,
  Hypertable::Error::MASTER_RANGESERVER_ALREADY_REGISTERED = 0x00040006, Hypertable::Error::MASTER_BAD_COLUMN_FAMILY = 0x00040007, Hypertable::Error::MASTER_SCHEMA_GENERATION_MISMATCH = 0x00040008, Hypertable::Error::MASTER_LOCATION_ALREADY_ASSIGNED = 0x00040009,
  Hypertable::Error::MASTER_LOCATION_INVALID = 0x0004000A, Hypertable::Error::MASTER_OPERATION_IN_PROGRESS = 0x0004000B, Hypertable::Error::MASTER_RANGESERVER_IN_RECOVERY = 0x0004000C, Hypertable::Error::MASTER_BALANCE_PREVENTED = 0x0004000D,
  Hypertable::Error::RANGESERVER_GENERATION_MISMATCH = 0x00050001, Hypertable::Error::RANGESERVER_RANGE_ALREADY_LOADED = 0x00050002, Hypertable::Error::RANGESERVER_RANGE_MISMATCH = 0x00050003, Hypertable::Error::RANGESERVER_NONEXISTENT_RANGE = 0x00050004,
  Hypertable::Error::RANGESERVER_OUT_OF_RANGE = 0x00050005, Hypertable::Error::RANGESERVER_RANGE_NOT_FOUND = 0x00050006, Hypertable::Error::RANGESERVER_INVALID_SCANNER_ID = 0x00050007, Hypertable::Error::RANGESERVER_SCHEMA_PARSE_ERROR = 0x00050008,
  Hypertable::Error::RANGESERVER_SCHEMA_INVALID_CFID = 0x00050009, Hypertable::Error::RANGESERVER_INVALID_COLUMNFAMILY = 0x0005000A, Hypertable::Error::RANGESERVER_TRUNCATED_COMMIT_LOG = 0x0005000B, Hypertable::Error::RANGESERVER_NO_METADATA_FOR_RANGE = 0x0005000C,
  Hypertable::Error::RANGESERVER_SHUTTING_DOWN = 0x0005000D, Hypertable::Error::RANGESERVER_CORRUPT_COMMIT_LOG = 0x0005000E, Hypertable::Error::RANGESERVER_UNAVAILABLE = 0x0005000F, Hypertable::Error::RANGESERVER_REVISION_ORDER_ERROR = 0x00050010,
  Hypertable::Error::RANGESERVER_ROW_OVERFLOW = 0x00050011, Hypertable::Error::RANGESERVER_TABLE_NOT_FOUND = 0x00050012, Hypertable::Error::RANGESERVER_BAD_SCAN_SPEC = 0x00050013, Hypertable::Error::RANGESERVER_CLOCK_SKEW = 0x00050014,
  Hypertable::Error::RANGESERVER_BAD_CELLSTORE_FILENAME = 0x00050015, Hypertable::Error::RANGESERVER_CORRUPT_CELLSTORE = 0x00050016, Hypertable::Error::RANGESERVER_TABLE_DROPPED = 0x00050017, Hypertable::Error::RANGESERVER_UNEXPECTED_TABLE_ID = 0x00050018,
  Hypertable::Error::RANGESERVER_RANGE_BUSY = 0x00050019, Hypertable::Error::RANGESERVER_BAD_CELL_INTERVAL = 0x0005001A, Hypertable::Error::RANGESERVER_SHORT_CELLSTORE_READ = 0x0005001B, Hypertable::Error::RANGESERVER_RANGE_NOT_ACTIVE = 0x0005001C,
  Hypertable::Error::RANGESERVER_FRAGMENT_ALREADY_PROCESSED = 0x0005001D, Hypertable::Error::RANGESERVER_RECOVERY_PLAN_GENERATION_MISMATCH = 0x0005001E, Hypertable::Error::RANGESERVER_PHANTOM_RANGE_MAP_NOT_FOUND = 0x0005001F, Hypertable::Error::RANGESERVER_RANGES_ALREADY_LIVE = 0x00050020,
  Hypertable::Error::RANGESERVER_RANGE_NOT_YET_ACKNOWLEDGED = 0x00050021, Hypertable::Error::RANGESERVER_SERVER_IN_READONLY_MODE = 0x00050022, Hypertable::Error::RANGESERVER_RANGE_NOT_YET_RELINQUISHED = 0x00050023, Hypertable::Error::HQL_BAD_LOAD_FILE_FORMAT = 0x00060001,
  Hypertable::Error::HQL_BAD_COMMAND = 0x00060002, Hypertable::Error::METALOG_ERROR = 0x00070000, Hypertable::Error::METALOG_VERSION_MISMATCH = 0x00070001, Hypertable::Error::METALOG_BAD_RS_HEADER = 0x00070002,
  Hypertable::Error::METALOG_BAD_HEADER = 0x00070003, Hypertable::Error::METALOG_ENTRY_TRUNCATED = 0x00070004, Hypertable::Error::METALOG_CHECKSUM_MISMATCH = 0x00070005, Hypertable::Error::METALOG_ENTRY_BAD_TYPE = 0x00070006,
  Hypertable::Error::METALOG_ENTRY_BAD_ORDER = 0x00070007, Hypertable::Error::METALOG_MISSING_RECOVER_ENTITY = 0x00070008, Hypertable::Error::METALOG_BACKUP_FILE_MISMATCH = 0x00070009, Hypertable::Error::METALOG_READ_ERROR = 0x0007000A,
  Hypertable::Error::SERIALIZATION_INPUT_OVERRUN = 0x00080001, Hypertable::Error::SERIALIZATION_BAD_VINT = 0x00080002, Hypertable::Error::SERIALIZATION_BAD_VSTR = 0x00080003, Hypertable::Error::SERIALIZATION_VERSION_MISMATCH = 0x00080004,
  Hypertable::Error::THRIFTBROKER_BAD_SCANNER_ID = 0x00090001, Hypertable::Error::THRIFTBROKER_BAD_MUTATOR_ID = 0x00090002, Hypertable::Error::THRIFTBROKER_BAD_NAMESPACE_ID = 0x00090003, Hypertable::Error::THRIFTBROKER_BAD_FUTURE_ID = 0x00090004
}
 

Functions

const char * Hypertable::Error::get_text (int error)
 Returns a descriptive error message. More...
 
void Hypertable::Error::generate_html_error_code_documentation (std::ostream &out)
 Generates and print the error documentation as html. More...
 
std::ostream & Hypertable::operator<< (std::ostream &out, const Exception &)
 Global operator to print an Exception to a std::ostream. More...
 
std::ostream & Hypertable::operator<< (std::ostream &out, const ExceptionMessageRenderer &r)
 Global helper operator to print an Exception to a std::ostream. More...
 
std::ostream & Hypertable::operator<< (std::ostream &out, const ExceptionMessagesRenderer &r)
 Global helper operator to print an Exception to a std::ostream. More...
 

Detailed Description

Error codes, Exception handling, error logging.

This file contains all error codes used in Hypertable, the Exception base class and macros for logging and error handling.

Definition in file Error.h.