diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-20 17:48:57 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-21 00:49:34 +0000 |
commit | a085ba3586756ac1f778d2862f75889de2449b0e (patch) | |
tree | bc991d1191069c79744f904334806f15ee6c98d5 | |
parent | ad821f70a2488a91f2be1ac53cb2e64f50743989 (diff) | |
download | rainbows-a085ba3586756ac1f778d2862f75889de2449b0e.tar.gz |
Sometimes we have stupid syntax or constant resolution errors in our code.
-rw-r--r-- | lib/rainbows/http_server.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index 72e2c7f..a5cb054 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -13,6 +13,7 @@ module Rainbows def initialize(app, options) G.server = self + @logger = Unicorn::Configurator::DEFAULTS[:logger] rv = super(app, options) defined?(@use) or use(:Base) @worker_connections ||= MODEL_WORKER_CONNECTIONS[@use] @@ -43,7 +44,9 @@ module Rainbows model = args.shift or return @use mod = begin Rainbows.const_get(model) - rescue NameError + rescue NameError => e + logger.error "error loading #{model.inspect}: #{e}" + e.backtrace.each { |l| logger.error l } raise ArgumentError, "concurrency model #{model.inspect} not supported" end |