lib/celluloid/proxy/future.rb in celluloid-0.17.2 vs lib/celluloid/proxy/future.rb in celluloid-0.17.3
- old
+ new
@@ -1,25 +1,9 @@
# A proxy which creates future calls to an actor
-class Celluloid::Proxy::Future < Celluloid::Proxy::Abstract
- attr_reader :mailbox
-
- # Used for reflecting on proxy objects themselves
- def __class__
- ::Celluloid::Proxy::Future
- end
-
- def initialize(mailbox, klass)
- @mailbox = mailbox
- @klass = klass
- end
-
- def inspect
- "#<Celluloid::Proxy::Future(#{@klass})>"
- end
-
+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"
+ fail ::Celluloid::DeadActorError, "attempted to call a dead actor: #{meth}"
end
if block_given?
# FIXME: nicer exception
fail "Cannot use blocks with futures yet"