From 22eff788cbeaf8066b890fa948f0c00f1c6a0379 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Sun, 11 Oct 2015 13:12:18 +0200 Subject: [PATCH] Rubocop: fix silently swallowing exceptions, use Kernel.warn for output --- Rakefile | 2 +- config/boot.rb | 2 +- config/unicorn.default.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 504ccec..478a3f2 100644 --- a/Rakefile +++ b/Rakefile @@ -10,5 +10,5 @@ begin RSpec::Core::RakeTask.new(:spec) task :default => :spec rescue LoadError - # no rspec available + warn "Notice: no rspec tasks available in this environment" end diff --git a/config/boot.rb b/config/boot.rb index 36b1587..edd056a 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -8,5 +8,5 @@ begin # try to use Yajl, the json_gem compatibility layer must be loaded after json require 'yajl/json_gem' rescue LoadError - # fail silently because json gem is fine + warn "JSON: unable to load Yajl; just using the json gem" end diff --git a/config/unicorn.default.rb b/config/unicorn.default.rb index 046fe2e..adb1255 100644 --- a/config/unicorn.default.rb +++ b/config/unicorn.default.rb @@ -25,7 +25,7 @@ before_fork do |server, _worker| begin Process.kill("QUIT", File.read(old_pid).to_i) rescue Errno::ENOENT, Errno::ESRCH - # someone else did our job for us + warn "Unicorn: master process already killed, no problem" end end end -- libgit2 0.21.2