Skip to content

Commit

Permalink
Handle signals by exiting
Browse files Browse the repository at this point in the history
git-svn-id: http://rubygems.rubyforge.org/svn/trunk@1428 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information
drbrain committed Oct 2, 2007
1 parent af97f82 commit 04a7c33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rubygems/indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def build_index

progress.updated spec.full_name

rescue SignalException => e
alert_error "Recieved signal, exiting"
raise
rescue Exception => e
alert_error "Unable to process #{gemfile}\n#{e.message} (#{e.class})\n\t#{e.backtrace.join "\n\t"}"
end
Expand Down Expand Up @@ -106,6 +109,7 @@ def generate_index

build_index
install_index
rescue SignalException
ensure
FileUtils.rm_rf @directory
end
Expand Down

0 comments on commit 04a7c33

Please sign in to comment.