[Groonga-commit] droonga/droonga-engine at 7b37bc1 [master] 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: 7b37bc1a58683bee09f672e5bc1a1b3e37d8653c
  https://github.com/droonga/droonga-engine/commit/7b37bc1a58683bee09f672e5bc1a1b3e37d8653c

  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����������������������������...
Télécharger 



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