CESNET / libyang-cpp

C++ bindings for the libyang library
https://gerrit.cesnet.cz/q/project:CzechLight/libyang-cpp
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

`validateAll` not checking error code of `lyd_validate_all` #20

Open rbu9fe opened 5 months ago

rbu9fe commented 5 months ago

As the title says currently validateAll does not check for any errors potentially returned by lyd_validate_all.

Shouldn't it be changed to throw on error just like the other wrappers do it?

    auto ret = lyd_validate_all(node ? &node->m_node : nullptr, nullptr, opts ? utils::toValidationOptions(*opts) : 0, nullptr);
    throwIfError(ret, "libyang::validateAll:");