Commit 22eff788cbeaf8066b890fa948f0c00f1c6a0379
1 parent
4f9b40cc
Exists in
master
and in
1 other branch
Rubocop: fix silently swallowing exceptions, use Kernel.warn for output
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
Rakefile
@@ -10,5 +10,5 @@ begin | @@ -10,5 +10,5 @@ begin | ||
10 | RSpec::Core::RakeTask.new(:spec) | 10 | RSpec::Core::RakeTask.new(:spec) |
11 | task :default => :spec | 11 | task :default => :spec |
12 | rescue LoadError | 12 | rescue LoadError |
13 | - # no rspec available | 13 | + warn "Notice: no rspec tasks available in this environment" |
14 | end | 14 | end |
config/boot.rb
@@ -8,5 +8,5 @@ begin | @@ -8,5 +8,5 @@ begin | ||
8 | # try to use Yajl, the json_gem compatibility layer must be loaded after json | 8 | # try to use Yajl, the json_gem compatibility layer must be loaded after json |
9 | require 'yajl/json_gem' | 9 | require 'yajl/json_gem' |
10 | rescue LoadError | 10 | rescue LoadError |
11 | - # fail silently because json gem is fine | 11 | + warn "JSON: unable to load Yajl; just using the json gem" |
12 | end | 12 | end |
config/unicorn.default.rb
@@ -25,7 +25,7 @@ before_fork do |server, _worker| | @@ -25,7 +25,7 @@ before_fork do |server, _worker| | ||
25 | begin | 25 | begin |
26 | Process.kill("QUIT", File.read(old_pid).to_i) | 26 | Process.kill("QUIT", File.read(old_pid).to_i) |
27 | rescue Errno::ENOENT, Errno::ESRCH | 27 | rescue Errno::ENOENT, Errno::ESRCH |
28 | - # someone else did our job for us | 28 | + warn "Unicorn: master process already killed, no problem" |
29 | end | 29 | end |
30 | end | 30 | end |
31 | end | 31 | end |