[Groonga-commit] groonga/groonga at 416517f [master] Show tokenizer name in error message

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Oct 29 15:26:14 JST 2018


Kouhei Sutou	2018-10-29 15:26:14 +0900 (Mon, 29 Oct 2018)

  Revision: 416517f04508ba59d9606a99f1f3a81d2b3858c2
  https://github.com/groonga/groonga/commit/416517f04508ba59d9606a99f1f3a81d2b3858c2

  Message:
    Show tokenizer name in error message

  Modified files:
    lib/tokenizer.c

  Modified: lib/tokenizer.c (+5 -1)
===================================================================
--- lib/tokenizer.c    2018-10-29 15:17:04 +0900 (6ad0121a5)
+++ lib/tokenizer.c    2018-10-29 15:26:14 +0900 (90912164c)
@@ -540,9 +540,13 @@ grn_tokenizer_create(grn_ctx *ctx,
                               0,
                               NULL);
   if (!tokenizer) {
+    if (name_length < 0) {
+      name_length = strlen(name);
+    }
     GRN_PLUGIN_ERROR(ctx,
                      GRN_TOKENIZER_ERROR,
-                     "[tokenizer][create] failed to create");
+                     "[tokenizer][create] failed to create: <%.*s>",
+                     name_length, name);
   }
 
   GRN_API_RETURN(tokenizer);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181029/d4ec1b09/attachment.html>


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