lib/celluloid/supervision/container/instance.rb in celluloid-supervision-0.20.0.pre6 vs lib/celluloid/supervision/container/instance.rb in celluloid-supervision-0.20.0

- old
+ new

@@ -33,18 +33,21 @@ invoke_injection(:before_start) @actor = @type.send(@method, *@args, &@block) @registry.add(@name, @actor, @branch) if @name invoke_injection(:after_start) rescue Celluloid::TimeoutError => ex - Internals::Logger.error("TimeoutError at start of supervised actor.") + Internals::Logger.error("TimeoutError at start of supervised instance of #{@type}") raise ex # TODO: Implement timeout/retry. # unless ( @retry += 1 ) <= INSTANCE_RETRY_LIMIT # raise ex # end # Internals::Logger.warn("TimeoutError at start of supervised actor. Retrying in #{INSTANCE_RETRY_WAIT} seconds. ( Attempt #{@retry} of #{INSTANCE_RETRY_LIMIT} )") # sleep INSTANCE_RETRY_WAIT # retry + rescue => ex + Internals::Logger.error("Error ( #{ex.class} ) at start of supervised instance of #{@type}") + raise ex end def restart # no need to reset @actor, as this is called in an `exclusive {}` block # @actor = nil