本文整理汇总了C++中LogCategory::fatal方法的典型用法代码示例。如果您正苦于以下问题:C++ LogCategory::fatal方法的具体用法?C++ LogCategory::fatal怎么用?C++ LogCategory::fatal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogCategory
的用法示例。
在下文中一共展示了LogCategory::fatal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check_class
void check_class(uint16_t id, string name, unsigned long hash)
{
DCClass* dcc = g_dcf->get_class(id);
if(name != dcc->get_name())
{
// TODO: Try and update the database instead of exiting
m_log->fatal() << "Class name '" << dcc->get_name() << "' from DCFile does not match"
" name '" << name << "' in database, for dc_id " << id << endl;
m_log->fatal() << "Database must be rebuilt." << endl;
exit(1);
}
HashGenerator gen;
dcc->generate_hash(gen);
if(hash != gen.get_hash())
{
// TODO: Try and update the database instead of exiting
m_log->fatal() << "Class hash '" << gen.get_hash() << "' from DCFile does not match"
" hash '" << hash << "' in database, for dc_id " << id << endl;
m_log->fatal() << "Database must be rebuilt." << endl;
exit(1);
}
// TODO: Check class_fields table exists
}
示例2: check_class
void check_class(uint16_t id, string name)
{
const Class* dcc = g_dcf->get_class_by_id(id);
if(name != dcc->get_name()) {
// TODO: Try and update the database instead of exiting
m_log->fatal() << "Class name '" << dcc->get_name() << "' from File does not match"
" name '" << name << "' in database, for dc_id " << id << endl;
m_log->fatal() << "Database must be rebuilt." << endl;
astron_shutdown(1);
}
// TODO: Check class_fields table exists
}
示例3: Role
DatabaseServer(RoleConfig roleconfig) : Role(roleconfig),
m_db_engine(DBEngineFactory::singleton.instantiate(
engine_type.get_rval(roleconfig),
roleconfig["engine"],
min_id.get_rval(roleconfig),
max_id.get_rval(roleconfig))),
m_control_channel(control_channel.get_rval(roleconfig)),
m_min_id(min_id.get_rval(roleconfig)),
m_max_id(max_id.get_rval(roleconfig))
{
// Initialize DatabaseServer log
std::stringstream log_title;
log_title << "Database(" << m_control_channel << ")";
m_log = new LogCategory("db", log_title.str());
// Check to see the engine was instantiated
if(!m_db_engine)
{
m_log->fatal() << "No database engine of type '" << engine_type.get_rval(roleconfig) << "' exists." << std::endl;
exit(1);
}
// Listen on control channel
subscribe_channel(m_control_channel);
}
示例4: exit
DBClientBase *new_connection()
{
string error;
DBClientBase *connection;
if(!(connection = m_connection_string.connect(error))) {
m_log->fatal() << "Connection failure: " << error << endl;
exit(1);
}
return connection;
}
示例5: add_variable
void ConfigGroup::add_variable(const string& varname, rtest r)
{
bool inserted = m_variables.insert(pair<string,rtest>(varname, r)).second;
if(!inserted)
{
config_log.fatal() << "Duplicate ConfigVariable name (" << varname << ") in ConfigGroup '"
<< m_name << ".'\n\tPlease submit a bug/issue to Astron with your"
<< " CMakeCache and this ouput.\n";
exit(1);
// TODO: Produce a warning for the developer or something...
}
}