lib/celluloid/proxy/future.rb in celluloid-0.18.0.pre vs lib/celluloid/proxy/future.rb in celluloid-0.18.0.pre2

- old
+ new

@@ -1,14 +1,12 @@ # A proxy which creates future calls to an actor class Celluloid::Proxy::Future < Celluloid::Proxy::AbstractCall def method_missing(meth, *args, &block) - unless @mailbox.alive? - fail ::Celluloid::DeadActorError, "attempted to call a dead actor: #{meth}" - end + raise ::Celluloid::DeadActorError, "attempted to call a dead actor: #{meth}" unless @mailbox.alive? if block_given? # FIXME: nicer exception - fail "Cannot use blocks with futures yet" + raise "Cannot use blocks with futures yet" end future = ::Celluloid::Future.new call = ::Celluloid::Call::Sync.new(future, meth, args, block)