Forgot some try/catch os user GetAccount*/GetCategory*
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user