plugins ext UPDATE print message on failed ext callback
diff --git a/src/plugins_exts.c b/src/plugins_exts.c
index 95ac9eb..d10191a 100644
--- a/src/plugins_exts.c
+++ b/src/plugins_exts.c
@@ -664,10 +664,15 @@
LIBYANG_API_DEF LY_ERR
lyplg_ext_get_data(const struct ly_ctx *ctx, const struct lysc_ext_instance *ext, void **ext_data, ly_bool *ext_data_free)
{
+ LY_ERR rc;
+
if (!ctx->ext_clb) {
lyplg_ext_compile_log(NULL, ext, LY_LLERR, LY_EINVAL, "Failed to get extension data, no callback set.");
return LY_EINVAL;
}
- return ctx->ext_clb(ext, ctx->ext_clb_data, ext_data, ext_data_free);
+ if ((rc = ctx->ext_clb(ext, ctx->ext_clb_data, ext_data, ext_data_free))) {
+ lyplg_ext_compile_log(NULL, ext, LY_LLERR, rc, "Callback for getting ext data failed.");
+ }
+ return rc;
}