[Groonga-commit] droonga/fluent-plugin-droonga at bbac986 [master] HandlerError should have only detail

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 26 12:43:00 JST 2013


YUKI Hiroshi	2013-12-26 12:43:00 +0900 (Thu, 26 Dec 2013)

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

  Merged d5217b2: Merge branch 'master' of 192.168.1.21:~piro/groonga/fluent-plugin-droonga into HEAD

  Message:
    HandlerError should have only detail

  Modified files:
    lib/droonga/handler_error.rb

  Modified: lib/droonga/handler_error.rb (+4 -13)
===================================================================
--- lib/droonga/handler_error.rb    2013-12-26 12:13:56 +0900 (15dfa4b)
+++ lib/droonga/handler_error.rb    2013-12-26 12:43:00 +0900 (d3d9e1c)
@@ -15,11 +15,11 @@
 
 module Droonga
   class HandlerError < StandardError
-    attr_reader :message
+    attr_reader :message, :detail
 
-    def initialize(message, options={})
+    def initialize(message, detail=nil)
       @message = message
-      self.detail = options[:detail] if options.include?(:detail)
+      @detail = detail
     end
 
     def name
@@ -30,21 +30,12 @@ module Droonga
       500
     end
 
-    def detail
-      @detail
-    end
-
-    def detail=(value)
-      @have_detail = true
-      @detail = value
-    end
-
     def to_response_body
       body = {
         "name"    => name,
         "message" => @message,
       }
-      body["detail"] = @detail if @have_detail
+      body["detail"] = @detail unles****@detai*****?
       body
     end
   end
-------------- next part --------------
HTML����������������������������...
Download 



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