Add better error handling, correct the location on disk of stylesheet

This commit is contained in:
Sam
2015-05-05 23:28:19 +10:00
parent eb244bac34
commit ea670118c1
3 changed files with 8 additions and 2 deletions

View File

@@ -89,7 +89,11 @@ class DiscourseStylesheets
File.open(stylesheet_fullpath, "w") do |f|
f.puts css
end
StylesheetCache.add(@target, digest, css)
begin
StylesheetCache.add(@target, digest, css)
rescue => e
Rails.logger.warn "Completely unexpected error adding item to cache #{e}"
end
css
end