kdb: better errors in kdbEnsure
@@ -1741,6 +1741,8 @@ static int ensureGlobalPluginMounted (KDB * handle, const char * pluginName, Key
if (result == ELEKTRA_PLUGIN_STATUS_ERROR)
{
ELEKTRA_LOG_WARNING ("could not add plugin %s to list plugin", pluginName);
+ ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (errorKey, "The global plugin %s couldn't be mounted (via the list plugin)",
+ pluginName);
return -1;
}
@@ -1779,6 +1781,8 @@ static int ensureGlobalPluginUnmounted (KDB * handle, const char * pluginName, K
if (result == ELEKTRA_PLUGIN_STATUS_ERROR)
{
ELEKTRA_LOG_WARNING ("could not remove %s from list plugin", pluginName);
+ ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (errorKey, "The global plugin %s couldn't be unmounted (via the list plugin)",
+ pluginName);
return -1;
}
@@ -1815,6 +1819,9 @@ static int ensurePluginUnmounted (KDB * handle, const char * mountpoint, const c
{
if (elektraPluginClose (setPlugin, errorKey) == ELEKTRA_PLUGIN_STATUS_ERROR)
{
+ ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (
+ errorKey, "The plugin %s couldn't be closed (set, position: %d, mountpoint: %s)", pluginName, i,
+ mountpoint);
ret = 0;
}
backend->setplugins[i] = NULL;
@@ -1824,6 +1831,9 @@ static int ensurePluginUnmounted (KDB * handle, const char * mountpoint, const c
{
if (elektraPluginClose (getPlugin, errorKey) == ELEKTRA_PLUGIN_STATUS_ERROR)
{
+ ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (
+ errorKey, "The plugin %s couldn't be closed (get, position: %d, mountpoint: %s)", pluginName, i,
+ mountpoint);
ret = 0;
}
backend->getplugins[i] = NULL;
@@ -1833,6 +1843,9 @@ static int ensurePluginUnmounted (KDB * handle, const char * mountpoint, const c
{
if (elektraPluginClose (errorPlugin, errorKey) == ELEKTRA_PLUGIN_STATUS_ERROR)
{
+ ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (
+ errorKey, "The plugin %s couldn't be closed (error, position: %d, mountpoint: %s)", pluginName, i,
+ mountpoint);
ret = 0;
}
backend->errorplugins[i] = NULL;
