Navigation Menu

Skip to content

Commit

Permalink
config: add key to error message on delete failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 28, 2018
1 parent 5076e4c commit 179c0e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/config.c
Expand Up @@ -155,15 +155,19 @@ grn_config_delete(grn_ctx *ctx,
rc = grn_io_lock(ctx, config->io, grn_lock_timeout);
if (rc != GRN_SUCCESS) {
if (ctx->rc == GRN_SUCCESS) {
ERR(rc, "[config][delete] failed to lock");
ERR(rc,
"[config][delete] failed to lock: <%.*s>",
key_size, key);
}
GRN_API_RETURN(rc);
}
rc = grn_hash_delete(ctx, config, key, key_size, NULL);
grn_io_unlock(config->io);
if (rc != GRN_SUCCESS) {
if (ctx->rc == GRN_SUCCESS) {
ERR(rc, "[config][delete] failed to delete");
ERR(rc,
"[config][delete] failed to delete: <%.*s>",
key_size, key);
}
}
}
Expand Down

0 comments on commit 179c0e5

Please sign in to comment.