summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-08-03 11:58:57 -0700
committerBryan McLellan <btm@opscode.com>2012-08-03 11:58:57 -0700
commit65cf5a31fdcf7ee71276c8e0914ffb2bf89bda98 (patch)
tree2e30a5cec403e1b2311decf9391fffdef1979dd0
parent6ed974221de5d01cd3ccac6129308dd5e1c24e1d (diff)
parent9c9842dc0b339efd8dca62485fe5b4408592c5e3 (diff)
downloadchef-65cf5a31fdcf7ee71276c8e0914ffb2bf89bda98.tar.gz
Merge branch 'CHEF-3273' into 10-stable
-rw-r--r--chef-server-webui/app/controllers/cookbooks.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/chef-server-webui/app/controllers/cookbooks.rb b/chef-server-webui/app/controllers/cookbooks.rb
index bae362fdbd..1c915241da 100644
--- a/chef-server-webui/app/controllers/cookbooks.rb
+++ b/chef-server-webui/app/controllers/cookbooks.rb
@@ -151,7 +151,12 @@ class Cookbooks < Application
when "plain"
show_plain_file(url)
else
- syntax_highlight(url)
+ begin
+ syntax_highlight(url)
+ rescue
+ Chef::Log.error("Error while parsing file #{url}")
+ show_plain_file(url)
+ end
end
end