summaryrefslogtreecommitdiffstats
path: root/parameter/PathNavigator.cpp
diff options
context:
space:
mode:
authorKevin Rocard <kevinx.rocard@intel.com>2013-11-21 12:16:28 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:04:15 +0100
commit4c3f8d84128a61f1b9af4260054ab5e4042b08ee (patch)
tree09ce06adf2f73ef1971ab2945f31189e70bdad6c /parameter/PathNavigator.cpp
parent1080f66c39d444bd21be08c0ca3635631a2fc07c (diff)
downloadexternal_parameter-framework-4c3f8d84128a61f1b9af4260054ab5e4042b08ee.zip
external_parameter-framework-4c3f8d84128a61f1b9af4260054ab5e4042b08ee.tar.gz
external_parameter-framework-4c3f8d84128a61f1b9af4260054ab5e4042b08ee.tar.bz2
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>
Diffstat (limited to 'parameter/PathNavigator.cpp')
-rw-r--r--parameter/PathNavigator.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/parameter/PathNavigator.cpp b/parameter/PathNavigator.cpp
index 34b1e65..c09e11a 100644
--- a/parameter/PathNavigator.cpp
+++ b/parameter/PathNavigator.cpp
@@ -49,7 +49,7 @@ bool CPathNavigator::navigateThrough(const string& strItemName, string& strError
{
if (!_bValid) {
- strError = "Path not well formed";
+ strError = "Path not well formed: " + getCurrentPath();
return false;
}
@@ -58,14 +58,16 @@ bool CPathNavigator::navigateThrough(const string& strItemName, string& strError
if (!pStrChildName) {
- strError = "Path not complete";
+ strError = "Path not complete: " + getCurrentPath() +
+ ", trying to access to " + strItemName;
return false;
}
if (*pStrChildName != strItemName) {
- strError = "Path not found";
+ strError = "Path not found: " + getCurrentPath() +
+ ", expected: " + strItemName + " but found: " + *pStrChildName;
return false;
}