summaryrefslogtreecommitdiff
path: root/src/FScl_AccountManagerImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/FScl_AccountManagerImpl.cpp')
-rw-r--r--src/FScl_AccountManagerImpl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/FScl_AccountManagerImpl.cpp b/src/FScl_AccountManagerImpl.cpp
index aeecc48..603a4be 100644
--- a/src/FScl_AccountManagerImpl.cpp
+++ b/src/FScl_AccountManagerImpl.cpp
@@ -74,6 +74,7 @@ _AccountManagerImpl::AddAccount(Account& account)
int accountDbId = 0;
int ret = account_insert_to_db(accountHandle, &accountDbId);
SysTryCatch(NID_SCL, ret != ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER, r = E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The application does not register the account provider.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryCatch(NID_SCL, ret != ACCOUNT_ERROR_NOT_ALLOW_MULTIPLE, r = E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The multiple accounts are not supported.", GetErrorMessage(E_INVALID_OPERATION));
SysTryCatch(NID_SCL, ret == ACCOUNT_ERROR_NONE, r = E_SYSTEM, E_SYSTEM, "[%s] The method cannot proceed due to a severe system error.", GetErrorMessage(E_SYSTEM));
{
@@ -130,6 +131,7 @@ _AccountManagerImpl::RemoveAccount(AccountId accountId)
int ret = account_delete_from_db_by_id(accountId);
SysTryReturnResult(NID_SCL, ret != ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER, E_INVALID_OPERATION, "The application does not register the account provider.");
+ SysTryReturnResult(NID_SCL, ret != ACCOUNT_ERROR_PERMISSION_DENIED, E_INVALID_OPERATION, "The application has no permission to remove this account.");
SysTryReturnResult(NID_SCL, ret != ACCOUNT_ERROR_RECORD_NOT_FOUND, E_OBJ_NOT_FOUND, "The specified account is not found.");
SysTryReturnResult(NID_SCL, ret == ACCOUNT_ERROR_NONE, E_SYSTEM, "The method cannot proceed due to a severe system error.");
@@ -149,6 +151,7 @@ _AccountManagerImpl::UpdateAccount(const Account& account)
int ret = account_update_to_db_by_id(accountHandle, account.GetId());
SysTryCatch(NID_SCL, ret != ACCOUNT_ERROR_NOT_REGISTERED_PROVIDER, r = E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The application does not register the account provider.", GetErrorMessage(E_INVALID_OPERATION));
+ SysTryCatch(NID_SCL, ret != ACCOUNT_ERROR_PERMISSION_DENIED, r = E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The application has no permission to update this account.", GetErrorMessage(E_INVALID_OPERATION));
SysTryCatch(NID_SCL, ret != ACCOUNT_ERROR_RECORD_NOT_FOUND, r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] The specified @c account does not exist.", GetErrorMessage(E_OBJ_NOT_FOUND));
SysTryCatch(NID_SCL, ret == ACCOUNT_ERROR_NONE, r = E_SYSTEM, E_SYSTEM, "[%s] The method cannot proceed due to a severe system error.", GetErrorMessage(E_SYSTEM));