summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-10 21:47:30 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-10 21:47:30 +0000
commit34f838685bf7d99968ba6e1c645bd1dc2d2db4a1 (patch)
treef5981cb253fed77901b5be441863de0357edebd4 /lib/redmine/scm
parentc25a79a61b1ee254bbfea6a55a56ce98c713da81 (diff)
downloadredmine-34f838685bf7d99968ba6e1c645bd1dc2d2db4a1.tar.gz
redmine-34f838685bf7d99968ba6e1c645bd1dc2d2db4a1.zip
scm: catch all exceptions at adapter shellout() to fork scm command (#8510, #6713, #4725, #5404).
If scm command does not exist, Linux JRuby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException in production environment. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6230 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm')
-rw-r--r--lib/redmine/scm/adapters/abstract_adapter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb
index 2e72ba14d..29b401a81 100644
--- a/lib/redmine/scm/adapters/abstract_adapter.rb
+++ b/lib/redmine/scm/adapters/abstract_adapter.rb
@@ -224,7 +224,11 @@ module Redmine
io.close_write
block.call(io) if block_given?
end
- rescue Errno::ENOENT => e
+ ## 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
msg = strip_credential(e.message)
# The command failed, log it and re-raise
logmsg = "SCM command failed, "