[Groonga-commit] ranguba/rroonga at a2b5396 [master] Support GRN_CANCEL

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 18 17:59:37 JST 2016


Kouhei Sutou	2016-04-18 17:59:37 +0900 (Mon, 18 Apr 2016)

  New Revision: a2b53961eb12a9f8be49ffb64f7d8389a31fed5a
  https://github.com/ranguba/rroonga/commit/a2b53961eb12a9f8be49ffb64f7d8389a31fed5a

  Message:
    Support GRN_CANCEL

  Modified files:
    ext/groonga/rb-grn-exception.c

  Modified: ext/groonga/rb-grn-exception.c (+17 -0)
===================================================================
--- ext/groonga/rb-grn-exception.c    2016-04-18 17:57:20 +0900 (21a267a)
+++ ext/groonga/rb-grn-exception.c    2016-04-18 17:59:37 +0900 (d836312)
@@ -100,6 +100,7 @@ static VALUE eGrnTokenFilterError;
 static VALUE eGrnCommandError;
 static VALUE eGrnPluginError;
 static VALUE eGrnScorerError;
+static VALUE eGrnCancel;
 
 VALUE
 rb_grn_rc_to_exception (grn_rc rc)
@@ -341,6 +342,9 @@ rb_grn_rc_to_exception (grn_rc rc)
       case GRN_SCORER_ERROR:
         exception = eGrnScorerError;
         break;
+      case GRN_CANCEL:
+        exception = eGrnCancel;
+        break;
     }
 
     if (NIL_P(exception))
@@ -589,6 +593,9 @@ rb_grn_rc_to_message (grn_rc rc)
       case GRN_SCORER_ERROR:
         message = "scorer error";
         break;
+      case GRN_CANCEL:
+        message = "cancel";
+        break;
     }
 
     if (!message)
@@ -1278,4 +1285,14 @@ rb_grn_init_exception (VALUE mGrn)
      */
     eGrnScorerError =
         rb_define_class_under(mGrn, "ScorerError", rb_eGrnError);
+
+    /*
+     * Document-class: Groonga::Cancel
+     *
+     * It is used when a processing is canceled.
+     *
+     * @since 6.0.1
+     */
+    eGrnCancel =
+        rb_define_class_under(mGrn, "Cancel", rb_eGrnError);
 }
-------------- next part --------------
HTML����������������������������...
Télécharger 



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