diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-25 06:50:25 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-25 06:50:25 +0000 |
commit | b0e17e8199bb40d0b1bed2c3dded355f439d8b3a (patch) | |
tree | 694b9ccde636af70a5aa515b62d1020a5eac9e62 /lib/redmine/scm/adapters/abstract_adapter.rb | |
parent | a12b7bcf2931045e63093adcd765d7c6e022fa05 (diff) | |
download | redmine-b0e17e8199bb40d0b1bed2c3dded355f439d8b3a.tar.gz redmine-b0e17e8199bb40d0b1bed2c3dded355f439d8b3a.zip |
Don't rescue Exception class (#31387).
Patch by Go MAEDA and Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@18197 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/abstract_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/abstract_adapter.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index d66f0da25..694273a71 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -247,11 +247,7 @@ module Redmine io.close_write unless options[:write_stdin] block.call(io) if block_given? end - ## If scm command does not exist, - ## Linux JRuby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException - ## in production environment. - # rescue Errno::ENOENT => e - rescue Exception => e + rescue => e msg = strip_credential(e.message) # The command failed, log it and re-raise logmsg = "SCM command failed, " @@ -282,7 +278,7 @@ module Redmine str.force_encoding(from) begin str.encode(to) - rescue Exception => err + rescue => err logger.error("failed to convert from #{from} to #{to}. #{err}") nil end |