Skip to content

Commit

Permalink
DCell::NotConfiguredError
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Apr 7, 2012
1 parent eb24db1 commit 031c3e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/dcell.rb
Expand Up @@ -24,6 +24,8 @@

# Distributed Celluloid
module DCell
class NotConfiguredError < RuntimeError; end # Not configured yet

DEFAULT_PORT = 7777 # Default DCell port
@config_lock = Mutex.new

Expand Down Expand Up @@ -69,7 +71,10 @@ def setup(options = {})
end

# Obtain the local node ID
def id; @configuration['id']; end
def id
raise NotConfiguredError, "please configure DCell with DCell.setup" unless @configuration
@configuration['id']
end

# Obtain the 0MQ address to the local mailbox
def addr; @configuration['addr']; end
Expand Down

0 comments on commit 031c3e7

Please sign in to comment.