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
This commit is contained in:
Toshi MARUYAMA 2011-07-10 21:47:30 +00:00
parent c25a79a61b
commit 34f838685b
1 changed files with 5 additions and 1 deletions

View File

@ -224,7 +224,11 @@ module Redmine
io.close_write io.close_write
block.call(io) if block_given? block.call(io) if block_given?
end 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) msg = strip_credential(e.message)
# The command failed, log it and re-raise # The command failed, log it and re-raise
logmsg = "SCM command failed, " logmsg = "SCM command failed, "