本文整理汇总了C++中LocalStatus::getErrors方法的典型用法代码示例。如果您正苦于以下问题:C++ LocalStatus::getErrors方法的具体用法?C++ LocalStatus::getErrors怎么用?C++ LocalStatus::getErrors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LocalStatus
的用法示例。
在下文中一共展示了LocalStatus::getErrors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
void UserManagement::execute(USHORT id)
{
if (id >= commands.getCount())
{
status_exception::raise(Arg::Gds(isc_random) << "Wrong job id passed to UserManagement::execute()");
}
if (!commands[id])
return; // Already executed
Auth::UserData* command = commands[id];
IManagement* manager = getManager(command->plugin.c_str());
if (!manager)
return; // Already commited
LocalStatus status;
CheckStatusWrapper statusWrapper(&status);
if (command->attr.entered() || command->op == Auth::ADDMOD_OPER)
{
Auth::StackUserData cmd;
cmd.op = Auth::DIS_OPER;
cmd.user.set(&statusWrapper, command->userName()->get());
check(&statusWrapper);
cmd.user.setEntered(&statusWrapper, 1);
check(&statusWrapper);
OldAttributes oldAttributes;
int ret = manager->execute(&statusWrapper, &cmd, &oldAttributes);
if (ret == 0 || status.getErrors()[1] != isc_missing_data_structures)
checkSecurityResult(ret, &status, command->userName()->get(), command->operation());
else
statusWrapper.init();
if (command->op == Auth::ADDMOD_OPER)
command->op = oldAttributes.present ? Auth::MOD_OPER : Auth::ADD_OPER;
if (command->attr.entered())
{
ConfigFile ocf(ConfigFile::USE_TEXT, oldAttributes.value.c_str(), ConfigFile::NO_COMMENTS);
ConfigFile::Parameters::const_iterator old(ocf.getParameters().begin());
ConfigFile::Parameters::const_iterator oldEnd(ocf.getParameters().end());
ConfigFile ccf(ConfigFile::USE_TEXT, command->attr.get(), ConfigFile::NO_COMMENTS);
ConfigFile::Parameters::const_iterator cur(ccf.getParameters().begin());
ConfigFile::Parameters::const_iterator curEnd(ccf.getParameters().end());
// Dup check
ConfigFile::KeyType prev;
while (cur != curEnd)
{
if (cur->name == prev)
(Arg::Gds(isc_dup_attribute) << cur->name).raise();
prev = cur->name;
++cur;
}
cur = ccf.getParameters().begin();
string merged;
while (old != oldEnd && cur != curEnd)
{
if (old->name == cur->name)
{
merge(merged, cur);
++old;
++cur;
}
else if (old->name < cur->name)
{
merge(merged, old);
++old;
}
else
{
merge(merged, cur);
++cur;
}
}
while (cur != curEnd)
{
merge(merged, cur);
++cur;
}
while (old != oldEnd)
{
merge(merged, old);
++old;
}
if (merged.hasData())
{
command->attr.set(&statusWrapper, merged.c_str());
check(&statusWrapper);
}
else
{
//.........这里部分代码省略.........