about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-15 12:10:42 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-15 12:10:42 -0800
commit1356d7c2c178adf68fbb8b745524b8f20c0b292e (patch)
tree69214183bd9f79b8cfe6dd7cd82ecda77f7823d6
parenta80ba923659a4287f05a8c69fe2c5ad8b65d28f7 (diff)
downloadunicorn-1356d7c2c178adf68fbb8b745524b8f20c0b292e.tar.gz
replace "rescue => e" with "rescue Object => e"
"Object" is needless noise and some folks are annoyed by
seeing it.
-rw-r--r--lib/unicorn.rb8
-rw-r--r--lib/unicorn/app/old_rails.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 1511b03..168f1f4 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -375,7 +375,7 @@ module Unicorn
         end
       rescue Errno::EINTR
         retry
-      rescue Object => e
+      rescue => e
         logger.error "Unhandled master loop exception #{e.inspect}."
         logger.error e.backtrace.join("\n")
         retry
@@ -477,7 +477,7 @@ module Unicorn
           logger.error "old PID:#{valid_pid?(old_pid)} running with " \
                        "existing pid=#{old_pid}, refusing rexec"
           return
-        rescue Object => e
+        rescue => e
           logger.error "error writing pid=#{old_pid} #{e.class} #{e.message}"
           return
         end
@@ -663,7 +663,7 @@ module Unicorn
         rescue Errno::EBADF
           nr < 0 or return
         end
-      rescue Object => e
+      rescue => e
         if alive
           logger.error "Unhandled listen loop exception #{e.inspect}."
           logger.error e.backtrace.join("\n")
@@ -719,7 +719,7 @@ module Unicorn
         self.app = orig_app
         build_app! if preload_app
         logger.info "done reloading config_file=#{config.config_file}"
-      rescue Object => e
+      rescue => e
         logger.error "error reloading config_file=#{config.config_file}: " \
                      "#{e.class} #{e.message}"
       end
diff --git a/lib/unicorn/app/old_rails.rb b/lib/unicorn/app/old_rails.rb
index 0633db3..e674d78 100644
--- a/lib/unicorn/app/old_rails.rb
+++ b/lib/unicorn/app/old_rails.rb
@@ -21,7 +21,7 @@ class Unicorn::App::OldRails
       Dispatcher.dispatch(cgi,
           ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
           cgi.body)
-    rescue Object => e
+    rescue => e
       err = env['rack.errors']
       err.write("#{e} #{e.message}\n")
       e.backtrace.each { |line| err.write("#{line}\n") }