[Groonga-commit] groonga/groonga at 028b302 [master] grn_ts: output an error message if error details are not available

Back to archive index

susumu.yata null+****@clear*****
Mon Oct 5 14:55:57 JST 2015


susumu.yata	2015-10-05 14:55:57 +0900 (Mon, 05 Oct 2015)

  New Revision: 028b30268be4d7eb0f7eb81fb61a9adbe671c6b8
  https://github.com/groonga/groonga/commit/028b30268be4d7eb0f7eb81fb61a9adbe671c6b8

  Message:
    grn_ts: output an error message if error details are not available
    
    GitHub: #412

  Modified files:
    lib/ts.c

  Modified: lib/ts.c (+8 -0)
===================================================================
--- lib/ts.c    2015-10-01 23:54:13 +0900 (a27f616)
+++ lib/ts.c    2015-10-05 14:55:57 +0900 (b67d191)
@@ -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;
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index