Better logging when optimizing image fails.

This commit is contained in:
Guo Xiang Tan 2018-07-18 14:11:23 +08:00
parent b068a8a771
commit 487ef9773f
1 changed files with 2 additions and 2 deletions

View File

@ -234,8 +234,8 @@ class OptimizedImage < ActiveRecord::Base
Discourse::Utils.execute_command(*instructions)
FileHelper.optimize_image!(to)
true
rescue
Rails.logger.error("Could not optimize image: #{to}")
rescue => e
Rails.logger.error("Could not optimize image #{to}: #{e.message}")
false
end