log CHANGE message improvements
diff --git a/src/log.c b/src/log.c
index b8f9f18..68de781 100644
--- a/src/log.c
+++ b/src/log.c
@@ -547,7 +547,7 @@
str = lysc_path(log_location.scnodes.objs[log_location.scnodes.count - 1], LYSC_PATH_LOG, NULL, 0);
LY_CHECK_ERR_RET(!str, LOGMEM(ctx), LY_EMEM);
- rc = asprintf(path, "Schema location %s", str);
+ rc = asprintf(path, "Schema location \"%s\"", str);
free(str);
LY_CHECK_ERR_RET(rc == -1, LOGMEM(ctx), LY_EMEM);
}
@@ -556,7 +556,7 @@
str = lyd_path(log_location.dnodes.objs[log_location.dnodes.count - 1], LYD_PATH_STD, NULL, 0);
LY_CHECK_ERR_RET(!str, LOGMEM(ctx), LY_EMEM);
- rc = asprintf(path, "%s%sata location %s", prev ? prev : "", prev ? ", d" : "D", str);
+ rc = asprintf(path, "%s%sata location \"%s\"", prev ? prev : "", prev ? ", d" : "D", str);
free(str);
free(prev);
LY_CHECK_ERR_RET(rc == -1, LOGMEM(ctx), LY_EMEM);
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 9dbecab..d31f459 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -330,16 +330,18 @@
for ( ; value_len && isspace(*value); ++value, --value_len) {}
if (!value || !value_len || !value[0]) {
- return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid empty %s value.", datatype);
+ return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid type %s empty value.", datatype);
}
switch (ly_parse_int(value, value_len, min, max, base, ret)) {
case LY_EDENIED:
- return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Value is out of %s's min/max bounds.", datatype);
+ return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
+ "Value \"%.*s\" is out of type %s min/max bounds.", (int)value_len, value, datatype);
case LY_SUCCESS:
return LY_SUCCESS;
default:
- return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid %s value \"%.*s\".", datatype, (int)value_len, value);
+ return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
+ "Invalid type %s value \"%.*s\".", datatype, (int)value_len, value);
}
}
@@ -355,19 +357,19 @@
for ( ; value_len && isspace(*value); ++value, --value_len) {}
if (!value || !value_len || !value[0]) {
- return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid empty %s value.", datatype);
+ return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid type %s empty value.", datatype);
}
*err = NULL;
switch (ly_parse_uint(value, value_len, max, base, ret)) {
case LY_EDENIED:
return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
- "Value \"%.*s\" is out of %s's min/max bounds.", (int)value_len, value, datatype);
+ "Value \"%.*s\" is out of type %s min/max bounds.", (int)value_len, value, datatype);
case LY_SUCCESS:
return LY_SUCCESS;
default:
return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
- "Invalid %s value \"%.*s\".", datatype, (int)value_len, value);
+ "Invalid type %s value \"%.*s\".", datatype, (int)value_len, value);
}
}
diff --git a/src/tree_data_common.c b/src/tree_data_common.c
index e023c54..f732cd2 100644
--- a/src/tree_data_common.c
+++ b/src/tree_data_common.c
@@ -765,8 +765,8 @@
if (!parent || strcmp(opaq->name.module_ns, parent->schema->module->ns)) {
mod = ly_ctx_get_module_implemented_ns(ctx, opaq->name.module_ns);
if (!mod) {
- LOGVAL(ctx, LYVE_REFERENCE, "No (implemented) module with namespace \"%s\" in the context.",
- opaq->name.module_ns);
+ LOGVAL(ctx, LYVE_REFERENCE, "No (implemented) module with namespace \"%s\" of node \"%s\" in the context.",
+ opaq->name.module_ns, opaq->name.name);
return LY_EVALID;
}
} else {
@@ -779,7 +779,8 @@
if (!parent || strcmp(opaq->name.module_name, parent->schema->module->name)) {
mod = ly_ctx_get_module_implemented(ctx, opaq->name.module_name);
if (!mod) {
- LOGVAL(ctx, LYVE_REFERENCE, "No (implemented) module named \"%s\" in the context.", opaq->name.module_name);
+ LOGVAL(ctx, LYVE_REFERENCE, "No (implemented) module named \"%s\" of node \"%s\" in the context.",
+ opaq->name.module_name, opaq->name.name);
return LY_EVALID;
}
} else {