[Groonga-commit] groonga/groonga at 6a8b2b1 [master] grn_table_size: improve error message

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Wed Sep 12 16:57:27 JST 2018


Kouhei Sutou	2018-09-12 16:57:27 +0900 (Wed, 12 Sep 2018)

  Revision: 6a8b2b19865178affcfec1a9986b83d140542c15
  https://github.com/groonga/groonga/commit/6a8b2b19865178affcfec1a9986b83d140542c15

  Message:
    grn_table_size: improve error message

  Modified files:
    lib/db.c

  Modified: lib/db.c (+5 -2)
===================================================================
--- lib/db.c    2018-09-11 15:19:11 +0900 (2918d8927)
+++ lib/db.c    2018-09-12 16:57:27 +0900 (263ff8954)
@@ -2478,11 +2478,14 @@ grn_table_size(grn_ctx *ctx, grn_obj *table)
       n = grn_array_size(ctx, (grn_array *)table);
       break;
     default :
-      ERR(GRN_INVALID_ARGUMENT, "not supported");
+      ERR(GRN_INVALID_ARGUMENT,
+          "[table][size] must be table or DB: <%s>(%u)",
+          grn_obj_type_to_string(table->header.type),
+          table->header.type);
       break;
     }
   } else {
-    ERR(GRN_INVALID_ARGUMENT, "invalid table assigned");
+    ERR(GRN_INVALID_ARGUMENT, "[table][size] must not NULL");
   }
   GRN_API_RETURN(n);
 }
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180912/7c835de8/attachment.htm 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index