Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions are reported twice #6

Open
bklang opened this issue Feb 20, 2014 · 0 comments
Open

Exceptions are reported twice #6

bklang opened this issue Feb 20, 2014 · 0 comments

Comments

@bklang
Copy link
Member

bklang commented Feb 20, 2014

Given code like this:

require 'reel'
class RequestHandler
  def initialize(host, port)
    logger.info "HTTP Request Handler initialized on #{host}:#{port}"
    @server = Reel::Server.supervise(host, port) do |connection|
      connection.each_request do |request|
        raise "blat"
      end
    end
  end
end

I get duplicate exceptions in the logs:

06:20:52 ahn.1  | [2014-02-20 06:20:52.338] ERROR Celluloid: Reel::Server crashed!
06:20:52 ahn.1  | RuntimeError: blat
06:20:52 ahn.1  |   /vagrant/ahn/lib/request_handler.rb:16:in `block (2 levels) in initialize'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/connection.rb:74:in `each_request'
06:20:52 ahn.1  |   /vagrant/ahn/lib/request_handler.rb:15:in `block in initialize'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/server.rb:32:in `call'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/server.rb:32:in `handle_connection'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
06:20:52 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
06:20:52 ahn.1  | [2014-02-20 06:20:52.338] WARN  Celluloid: Terminating task: type=:call, meta={:method_name=>:run}, status=:iowait
06:20:54 ahn.1  | [2014-02-20 06:20:52.338] ERROR Adhearsion::Initializer: <RuntimeError> blat
06:20:54 ahn.1  |   /vagrant/ahn/lib/request_handler.rb:16:in `block (2 levels) in initialize'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/connection.rb:74:in `each_request'
06:20:54 ahn.1  |   /vagrant/ahn/lib/request_handler.rb:15:in `block in initialize'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/server.rb:32:in `call'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/reel-0.4.0/lib/reel/server.rb:32:in `handle_connection'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
06:20:54 ahn.1  |   /vagrant/ahn/vendor/ruby/ruby/2.1.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'

Good news is that, despite the scary looking text, the Reel server does continue to process requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant