summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Gautier <superbaloo+registrations.github@superbaloo.net>2012-07-09 20:29:51 +0300
committerBryan McLellan <btm@opscode.com>2012-08-03 11:57:55 -0700
commitcb141217d977afe74d0bda4ffec8e4aff80f28e8 (patch)
treeb08c620dcd44a8ff7bfc361459768c168ab21755
parent6ed974221de5d01cd3ccac6129308dd5e1c24e1d (diff)
downloadchef-cb141217d977afe74d0bda4ffec8e4aff80f28e8.tar.gz
Fix unparsable files returning empty errors
Like forgotten vim undofiles uploaded in chef.
-rw-r--r--chef-server-webui/app/controllers/cookbooks.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/chef-server-webui/app/controllers/cookbooks.rb b/chef-server-webui/app/controllers/cookbooks.rb
index bae362fdbd..499084cbde 100644
--- a/chef-server-webui/app/controllers/cookbooks.rb
+++ b/chef-server-webui/app/controllers/cookbooks.rb
@@ -151,7 +151,11 @@ 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}")
+ end
end
end