Skip to content

Commit 8d9889c

Browse files
committed
xpath UPDATE special err code on not found node
1 parent 2ac9115 commit 8d9889c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xpath.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8039,14 +8039,14 @@ eval_name_test_scnode_no_match_msg(struct lyxp_set *set, const struct lyxp_set_s
80398039
if (ppath) {
80408040
format = "Schema node \"%.*s\" for parent \"%s\" not found; in expr \"%.*s\" with context node \"%s\".";
80418041
if (options & LYXP_SCNODE_ERROR) {
8042-
LOGERR(set->ctx, LY_EVALID, format, ncname_len, ncname, ppath, (ncname - expr) + ncname_len, expr, path);
8042+
LOGERR(set->ctx, LY_ENOTFOUND, format, ncname_len, ncname, ppath, (ncname - expr) + ncname_len, expr, path);
80438043
} else {
80448044
LOGWRN(set->ctx, format, ncname_len, ncname, ppath, (ncname - expr) + ncname_len, expr, path);
80458045
}
80468046
} else {
80478047
format = "Schema node \"%.*s\" not found; in expr \"%.*s\" with context node \"%s\".";
80488048
if (options & LYXP_SCNODE_ERROR) {
8049-
LOGERR(set->ctx, LY_EVALID, format, ncname_len, ncname, (ncname - expr) + ncname_len, expr, path);
8049+
LOGERR(set->ctx, LY_ENOTFOUND, format, ncname_len, ncname, (ncname - expr) + ncname_len, expr, path);
80508050
} else {
80518051
LOGWRN(set->ctx, format, ncname_len, ncname, (ncname - expr) + ncname_len, expr, path);
80528052
}
@@ -8193,7 +8193,7 @@ eval_name_test_with_predicate(const struct lyxp_expr *exp, uint32_t *tok_idx, en
81938193

81948194
if (options & LYXP_SCNODE_ERROR) {
81958195
/* error */
8196-
rc = LY_EVALID;
8196+
rc = LY_ENOTFOUND;
81978197
goto cleanup;
81988198
}
81998199

0 commit comments

Comments
 (0)