Navigation Menu

Skip to content

Commit

Permalink
Raise an error when there is no catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 16, 2015
1 parent ccc7b50 commit f1e9875
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/droonga/cluster.rb
Expand Up @@ -23,6 +23,9 @@ module Droonga
class Cluster
include Loggable

class NoCatalogLoaded < Error
end

attr_accessor :catalog
attr_writer :on_change

Expand Down Expand Up @@ -148,11 +151,8 @@ def load_state_file
end

def all_node_names
if @catalog
@catalog.all_nodes
else
[]
end
raise NoCatalogLoaded.new unless @catalog
@catalog.all_nodes
end

def create_engine_nodes
Expand Down

0 comments on commit f1e9875

Please sign in to comment.