Commit ed9c6428 by jyurek

More error message goodness.

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@185 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent c015fb88
......@@ -323,8 +323,10 @@ module Thoughtbot #:nodoc:
io.close_write
StringIO.new(io.read)
end
rescue Errno::EPIPE => e
raise PaperclipError.new(attachment, "Could not create thumbnail. Is ImageMagick or GraphicsMagick installed and available?", e)
rescue SystemCallError => e
raise PaperclipError.new(attachment, "Error creating thumbnail. #{e}")
raise PaperclipError.new(attachment, "Could not create thumbnail.", e)
end
if ::Thoughtbot::Paperclip.options[:whiny_thumbnails]
raise PaperclipError.new(attachment, "Convert returned with result code #{$?.exitstatus}: #{thumb.read}") unless $?.success?
......
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