summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/policies/policy_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/policies/policy_handler.cc')
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index b92685e278..b0a4c4586d 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -337,8 +337,11 @@ bool PolicyHandler::LoadPolicyLibrary() {
bool PolicyHandler::CreateManager() {
void* policy_handle = dlopen(kLibrary.c_str(), RTLD_LAZY);
const char* error = dlerror();
- if (error) {
- LOG4CXX_ERROR(logger_, error);
+ if (!policy_handle) {
+ LOG4CXX_ERROR(
+ logger_,
+ (error == NULL ? "Unknown error in dlopen while loading policy table"
+ : error));
return false;
}