From 66b5ad8e0b0906e7b3919d45d8f3f403cb1052f1 Mon Sep 17 00:00:00 2001 From: Zofia Abramowska Date: Thu, 12 Feb 2015 17:39:21 +0100 Subject: [PATCH] Fix pluginCheck in service logic Change-Id: I835c471b38756a9d3cee1ddfe4c4b90591744aa4 --- src/service/logic/Logic.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/service/logic/Logic.cpp b/src/service/logic/Logic.cpp index 95656e5..e92808e 100644 --- a/src/service/logic/Logic.cpp +++ b/src/service/logic/Logic.cpp @@ -210,8 +210,9 @@ bool Logic::pluginCheck(const RequestContextPtr &context, const PolicyKey &key, ServicePluginInterfacePtr servicePlugin = std::dynamic_pointer_cast(plugin); - if (!plugin) { - throw PluginNotFoundException(result); + if (!servicePlugin) { + result = PolicyResult(PredefinedPolicyType::DENY); + return true; } AgentType requiredAgent; @@ -243,7 +244,8 @@ bool Logic::pluginCheck(const RequestContextPtr &context, const PolicyKey &key, } return false; default: - throw PluginErrorException(key); // This 'throw' should be removed or handled properly. + result = PolicyResult(PredefinedPolicyType::DENY); + return true; } } -- 2.7.4