[Groonga-commit] groonga/groonga [master] ignore MeCab tokenizer load error. fixes #893

Back to archive index

null+****@clear***** null+****@clear*****
2011年 3月 28日 (月) 18:52:26 JST


Kouhei Sutou	2011-03-28 09:52:26 +0000 (Mon, 28 Mar 2011)

  New Revision: 5f60edfc1ac715ad7e597def1ae72a17bedecf5a

  Log:
    ignore MeCab tokenizer load error. fixes #893

  Modified files:
    lib/db.c

  Modified: lib/db.c (+4 -1)
===================================================================
--- lib/db.c    2011-03-28 09:18:49 +0000 (9b044dc)
+++ lib/db.c    2011-03-28 09:52:26 +0000 (d01b97d)
@@ -136,7 +136,9 @@ grn_db_open(grn_ctx *ctx, const char *path)
           grn_ctx_use(ctx, (grn_obj *)s);
           grn_ctx_use(ctx_, (grn_obj *)s);
 #ifdef WITH_MECAB
-          grn_db_init_mecab_tokenizer(ctx);
+          if (grn_db_init_mecab_tokenizer(ctx)) {
+            ERRCLR(ctx);
+          }
 #endif
           grn_db_init_builtin_tokenizers(ctx);
           grn_db_init_builtin_query(ctx);
@@ -7075,6 +7077,7 @@ grn_db_init_builtin_types(grn_ctx *ctx)
   }
 #ifdef WITH_MECAB
   if (grn_db_init_mecab_tokenizer(ctx)) {
+    ERRCLR(ctx);
 #endif
     grn_obj_register(ctx, db, "TokenMecab", 10);
 #ifdef WITH_MECAB




Groonga-commit メーリングリストの案内
Back to archive index