[Groonga-commit] ranguba/rroonga at 2d5f046 [master] Add Groonga::WindowFunctionError

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jun 6 16:02:45 JST 2016


Kouhei Sutou	2016-06-06 16:02:45 +0900 (Mon, 06 Jun 2016)

  New Revision: 2d5f04614bf19fc6f66ac4693335f5076bd5594c
  https://github.com/ranguba/rroonga/commit/2d5f04614bf19fc6f66ac4693335f5076bd5594c

  Message:
    Add Groonga::WindowFunctionError

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

  Modified: ext/groonga/rb-grn-exception.c (+17 -0)
===================================================================
--- ext/groonga/rb-grn-exception.c    2016-06-06 15:57:57 +0900 (69a470e)
+++ ext/groonga/rb-grn-exception.c    2016-06-06 16:02:45 +0900 (c0600e9)
@@ -101,6 +101,7 @@ static VALUE eGrnCommandError;
 static VALUE eGrnPluginError;
 static VALUE eGrnScorerError;
 static VALUE eGrnCancel;
+static VALUE eGrnWindowFunctionError;
 
 VALUE
 rb_grn_rc_to_exception (grn_rc rc)
@@ -345,6 +346,9 @@ rb_grn_rc_to_exception (grn_rc rc)
       case GRN_CANCEL:
         exception = eGrnCancel;
         break;
+      case GRN_WINDOW_FUNCTION_ERROR:
+        exception = eGrnWindowFunctionError;
+        break;
     }
 
     if (NIL_P(exception))
@@ -596,6 +600,9 @@ rb_grn_rc_to_message (grn_rc rc)
       case GRN_CANCEL:
         message = "cancel";
         break;
+      case GRN_WINDOW_FUNCTION_ERROR:
+        message = "window function error";
+        break;
     }
 
     if (!message)
@@ -1295,4 +1302,14 @@ rb_grn_init_exception (VALUE mGrn)
      */
     eGrnCancel =
         rb_define_class_under(mGrn, "Cancel", rb_eGrnError);
+
+    /*
+     * Document-class: Groonga::WindowFunctionError
+     *
+     * It is used when window function causes an error.
+     *
+     * @since 6.0.4
+     */
+    eGrnWindowFunctionError =
+        rb_define_class_under(mGrn, "WindowFunctionError", rb_eGrnError);
 }
-------------- next part --------------
HTML����������������������������...
Download 



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