diff options
author | Marcin Lis <m.lis@samsung.com> | 2014-07-16 16:54:59 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2014-07-18 13:06:13 -0700 |
commit | 3385812d18cb304f997434fb877fb3a8477068e2 (patch) | |
tree | 170c662e94acbedb47f954998cdaa56ca4e150f0 | |
parent | fa749491cb36afa924364e703b7d097546d17f36 (diff) | |
download | security-manager-3385812d18cb304f997434fb877fb3a8477068e2.tar.gz security-manager-3385812d18cb304f997434fb877fb3a8477068e2.tar.bz2 security-manager-3385812d18cb304f997434fb877fb3a8477068e2.zip |
Cynara: Change the type of exception in CynaraAdminPolicy constructors
It is better to keep exception types unified. That would minimize the number of
"catch" statements.
Change-Id: Id9e5bafef70c7ffb126a60c595505b644d596729
Signed-off-by: Marcin Lis <m.lis@samsung.com>
-rw-r--r-- | src/server/service/cynara.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/service/cynara.cpp b/src/server/service/cynara.cpp index 7b1dbb8d..2cf3f198 100644 --- a/src/server/service/cynara.cpp +++ b/src/server/service/cynara.cpp @@ -44,7 +44,8 @@ CynaraAdminPolicy::CynaraAdminPolicy(const std::string &client, const std::strin free(this->client); free(this->user); free(this->privilege); - throw std::bad_alloc(); + ThrowMsg(CynaraException::OutOfMemory, + std::string("Error in CynaraAdminPolicy allocation.")); } this->result = static_cast<int>(operation); @@ -70,7 +71,8 @@ CynaraAdminPolicy::CynaraAdminPolicy(const std::string &client, const std::strin free(this->user); free(this->privilege); free(this->result_extra); - throw std::bad_alloc(); + ThrowMsg(CynaraException::OutOfMemory, + std::string("Error in CynaraAdminPolicy allocation.")); } } |