Make "Path not found" error more verbose
BZ: 156207
When an error occurs while using a path one does not know which path it
refers to.
Append the unfound path to the error : "Path not found:
/the/path/that/was/not/found"
Change-Id: If53c1a5c301906b464d38f604d6e97029f83ae3f
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index 59dc057..a07cc57 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -715,7 +715,7 @@
if (!pElement) {
- strError = "Path not found";
+ strError = "Path not found: " + strPath;
return NULL;
}
@@ -734,14 +734,14 @@
if (!pConfigurableElement) {
// Element not found
- strError = "Element not found";
+ strError = "Element not found: " + strPath;
return NULL;
}
if (!pConfigurableElement->isParameter()) {
// Element is not parameter
- strError = "Not a parameter";
+ strError = "Not a parameter: " + strPath;
return NULL;
}