Skip to content

Commit

Permalink
[webui] catch an exception that is not supposed to happen
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Nov 9, 2012
1 parent 6c148d1 commit e9a6e0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/webui/app/controllers/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,11 @@ def live_build_log
c
end
end
@initiallog.encode!('UTF-8', invalid: :replace, xml: :text, undef: :replace, cr_newline: true)
begin
@initiallog.encode!(invalid: :replace, xml: :text, undef: :replace, cr_newline: true)
rescue Encoding::UndefinedConversionError
# encode! is documented not to throw it if undef: is :replace, but at least we tried - and ruby 1.9.3 is buggy
end
end


Expand Down

0 comments on commit e9a6e0b

Please sign in to comment.