diff options
author | Arthur Gautier <superbaloo+registrations.github@superbaloo.net> | 2012-07-09 20:29:51 +0300 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-08-03 11:57:55 -0700 |
commit | cb141217d977afe74d0bda4ffec8e4aff80f28e8 (patch) | |
tree | b08c620dcd44a8ff7bfc361459768c168ab21755 | |
parent | 6ed974221de5d01cd3ccac6129308dd5e1c24e1d (diff) | |
download | chef-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.rb | 6 |
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 |