Navigation Menu

Skip to content

Commit

Permalink
grn_ts: output an error message if error details are not available
Browse files Browse the repository at this point in the history
GitHub: #412
  • Loading branch information
s-yata committed Oct 5, 2015
1 parent 1328c64 commit 028b302
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ts.c
Expand Up @@ -7041,6 +7041,14 @@ grn_ts_select(grn_ctx *ctx, grn_obj *table,
if (records) {
GRN_FREE(records);
}
if (rc != GRN_SUCCESS) {
GRN_BULK_REWIND(ctx->impl->outbuf);
if ((ctx->rc == GRN_SUCCESS) || !ctx->errbuf[0]) {
ERR(rc, "error message is missing");
} else if (ctx->errlvl < GRN_LOG_ERROR) {
ctx->errlvl = GRN_LOG_ERROR;
}
}
return rc;
}

Expand Down

0 comments on commit 028b302

Please sign in to comment.