Commit 8253c89f by Gaurish Sharma Committed by Geoff Harcourt

Remove bad exception handling!

Exception is the root of Ruby's exception hierarchy, so when you rescue Exception you rescue from everything, including subclasses such as SyntaxError, LoadError, and Interrupt etc which is a bad idea.

Fix: rescue from StandardError.
parent 9b480535
......@@ -46,7 +46,7 @@ namespace :paperclip do
attachment = instance.send(name)
begin
attachment.reprocess!(*styles)
rescue Exception => e
rescue => e
Paperclip::Task.log_error("exception while processing #{klass} ID #{instance.id}:")
Paperclip::Task.log_error(" " + e.message + "\n")
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment