[Groonga-commit] droonga/fluent-plugin-droonga at 5aeea47 [master] Make it easy to refer "ErrorMessage::*" classes from plugins

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Feb 19 16:31:04 JST 2014


YUKI Hiroshi	2014-02-19 16:31:04 +0900 (Wed, 19 Feb 2014)

  New Revision: 5aeea47cc9bd44a7554e5b504d02e3e3509bc6b1
  https://github.com/droonga/fluent-plugin-droonga/commit/5aeea47cc9bd44a7554e5b504d02e3e3509bc6b1

  Message:
    Make it easy to refer "ErrorMessage::*" classes from plugins

  Modified files:
    lib/droonga/adapter.rb
    lib/droonga/collector.rb
    lib/droonga/handler.rb
    lib/droonga/planner.rb
    lib/droonga/plugins/crud.rb

  Modified: lib/droonga/adapter.rb (+2 -0)
===================================================================
--- lib/droonga/adapter.rb    2014-02-19 16:11:14 +0900 (a3205b2)
+++ lib/droonga/adapter.rb    2014-02-19 16:31:04 +0900 (98092c3)
@@ -16,10 +16,12 @@
 require "droonga/pluggable"
 require "droonga/plugin/metadata/adapter_input_message"
 require "droonga/plugin/metadata/adapter_output_message"
+require "droonga/error_messages"
 
 module Droonga
   class Adapter
     extend Pluggable
+    include ErrorMessages
 
     class << self
       def input_message

  Modified: lib/droonga/collector.rb (+2 -0)
===================================================================
--- lib/droonga/collector.rb    2014-02-19 16:11:14 +0900 (bb94d65)
+++ lib/droonga/collector.rb    2014-02-19 16:31:04 +0900 (7d0e659)
@@ -15,10 +15,12 @@
 
 require "droonga/pluggable"
 require "droonga/plugin/metadata/collector_message"
+require "droonga/error_messages"
 
 module Droonga
   class Collector
     extend Pluggable
+    include ErrorMessages
 
     class << self
       def message

  Modified: lib/droonga/handler.rb (+2 -0)
===================================================================
--- lib/droonga/handler.rb    2014-02-19 16:11:14 +0900 (145381d)
+++ lib/droonga/handler.rb    2014-02-19 16:31:04 +0900 (b1fdf11)
@@ -16,10 +16,12 @@
 require "droonga/pluggable"
 require "droonga/plugin/metadata/input_message"
 require "droonga/plugin/metadata/handler_action"
+require "droonga/error_messages"
 
 module Droonga
   class Handler
     extend Pluggable
+    include ErrorMessages
 
     class << self
       def message

  Modified: lib/droonga/planner.rb (+2 -0)
===================================================================
--- lib/droonga/planner.rb    2014-02-19 16:11:14 +0900 (6485e50)
+++ lib/droonga/planner.rb    2014-02-19 16:31:04 +0900 (285581d)
@@ -16,10 +16,12 @@
 require "droonga/pluggable"
 require "droonga/plugin/metadata/planner_message"
 require "droonga/distributed_command_planner"
+require "droonga/error_messages"
 
 module Droonga
   class Planner
     extend Pluggable
+    include ErrorMessages
 
     class << self
       def message

  Modified: lib/droonga/plugins/crud.rb (+5 -5)
===================================================================
--- lib/droonga/plugins/crud.rb    2014-02-19 16:11:14 +0900 (11ec426)
+++ lib/droonga/plugins/crud.rb    2014-02-19 16:31:04 +0900 (b4caf52)
@@ -50,33 +50,33 @@ module Droonga
       class Handler < Droonga::Handler
         message.type = "add"
 
-        class MissingTableParameter < ErrorMessages::BadRequest
+        class MissingTableParameter < BadRequest
           def initialize
             super("\"table\" must be specified.")
           end
         end
 
-        class MissingPrimaryKeyParameter < ErrorMessages::BadRequest
+        class MissingPrimaryKeyParameter < BadRequest
           def initialize(table_name)
             super("\"key\" must be specified. " +
                     "The table #{table_name.inspect} requires a primary key for a new record.")
           end
         end
 
-        class UnknownTable < ErrorMessages::NotFound
+        class UnknownTable < NotFound
           def initialize(table_name)
             super("The table #{table_name.inspect} does not exist in the dataset.")
           end
         end
 
-        class InvalidValue < ErrorMessages::BadRequest
+        class InvalidValue < BadRequest
           def initialize(column, value, request)
             super("The column #{column.inspect} cannot store the value #{value.inspect}.",
                   request)
           end
         end
 
-        class UnknownColumn < ErrorMessages::NotFound
+        class UnknownColumn < NotFound
           def initialize(column, table, request)
             super("The column #{column.inspect} does not exist in the table #{table.inspect}.",
                   request)
-------------- next part --------------
HTML����������������������������...
下載 



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