[Groonga-commit] droonga/droonga-engine at 270de90 [buffered-forward] Raise an error when failed to fetch catalog

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Mar 27 12:54:25 JST 2015


YUKI Hiroshi	2015-03-27 12:54:25 +0900 (Fri, 27 Mar 2015)

  New Revision: 270de90818846076700246528b7cc0806edf5aa7
  https://github.com/droonga/droonga-engine/commit/270de90818846076700246528b7cc0806edf5aa7

  Message:
    Raise an error when failed to fetch catalog

  Modified files:
    lib/droonga/catalog_fetcher.rb

  Modified: lib/droonga/catalog_fetcher.rb (+4 -0)
===================================================================
--- lib/droonga/catalog_fetcher.rb    2015-03-27 11:56:59 +0900 (d035235)
+++ lib/droonga/catalog_fetcher.rb    2015-03-27 12:54:25 +0900 (e02facb)
@@ -22,6 +22,9 @@ require "droonga/catalog/dataset"
 
 module Droonga
   class CatalogFetcher
+    class EmptyCatalog < StandardError
+    end
+
     def initialize(client_options)
       @client_options = default_options.merge(client_options)
     end
@@ -33,6 +36,7 @@ module Droonga
       }
       Droonga::Client.open(@client_options) do |client|
         response = client.request(message)
+        raise EmptyCatalog.new unless response
         response["body"]
       end
     end
-------------- next part --------------
HTML����������������������������...
Download 



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