Return the error via the context instead of calling ctl_fatal() so that the caller can decide how to handle it.
Signed-off-by: Jakub Sitnicki <[email protected]> --- lib/db-ctl-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index a59ac30c4..0aba5b6a3 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -1494,11 +1494,12 @@ cmd_add(struct ctl_context *ctx) ovsdb_datum_destroy(&add, type); } if (old.n > type->n_max) { - ctl_fatal("\"add\" operation would put %u %s in column %s of " + ctl_error(ctx, "\"add\" operation would put %u %s in column %s of " "table %s but the maximum number is %u", old.n, type->value.type == OVSDB_TYPE_VOID ? "values" : "pairs", column->name, table->name, type->n_max); + return; } ovsdb_idl_txn_verify(row, column); ovsdb_idl_txn_write(row, column, &old); -- 2.14.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
