Forgot some try/catch os user GetAccount*/GetCategory*

This commit is contained in:
2012-04-27 20:24:22 +02:00
parent 993e6b1759
commit 8c4ee64111
2 changed files with 43 additions and 27 deletions

View File

@@ -119,7 +119,7 @@ void XMLImportEngine::LoadAccount(const QXmlAttributes& attrs)
_accounts[ac.id] = _user->GetAccountIdFromAccountNumber(ac.number);
return;
}
catch (User::AccountNotFound)
catch (User::AccountNotFound e)
{
}
}
@@ -130,7 +130,7 @@ void XMLImportEngine::LoadAccount(const QXmlAttributes& attrs)
_accounts[ac.id] = _user->GetAccountId(ac.name);
return;
}
catch (User::AccountNotFound)
catch (User::AccountNotFound e)
{
}
}
@@ -187,13 +187,15 @@ void XMLImportEngine::LoadCategory(const QXmlAttributes& attrs)
UNESCAPE_CHARS(cat.name);
int catId = _user->GetCategoryId(name);
if (catId)
try
{
int catId = _user->GetCategoryId(name);
_categories[id] = catId;
return;
}
catch(User::CategoryNotFound e)
{}
_categories[id] = --unknownCategory;
_unresolvedCategories.push_back(cat);