mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
Better logging when optimizing image fails.
This commit is contained in:
parent
b068a8a771
commit
487ef9773f
@ -234,8 +234,8 @@ class OptimizedImage < ActiveRecord::Base
|
|||||||
Discourse::Utils.execute_command(*instructions)
|
Discourse::Utils.execute_command(*instructions)
|
||||||
FileHelper.optimize_image!(to)
|
FileHelper.optimize_image!(to)
|
||||||
true
|
true
|
||||||
rescue
|
rescue => e
|
||||||
Rails.logger.error("Could not optimize image: #{to}")
|
Rails.logger.error("Could not optimize image #{to}: #{e.message}")
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user