- if (pctx->merge)
- UCI_INTERNAL(uci_set, ctx, pctx->package, pctx->section->e.name, name, value);
- else
+ if (pctx->merge) {
+ UCI_TRAP_SAVE(ctx, error);
+ uci_set(ctx, pctx->package, pctx->section->e.name, name, value);
+ UCI_TRAP_RESTORE(ctx);
+ return;
+error:
+ UCI_THROW(ctx, ctx->errno);
+ } else