X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/252c2f70225595312151bcf77ee7c8f5aac0c831..c3785ff278f605fc6c98ac0bdcd3dc3c79de05a4:/config/initializers/libxml.rb diff --git a/config/initializers/libxml.rb b/config/initializers/libxml.rb index 4f71b6d0f..ae636a9a3 100644 --- a/config/initializers/libxml.rb +++ b/config/initializers/libxml.rb @@ -1,8 +1,9 @@ -#require 'rubygems' -#gem 'libxml-ruby', '>= 0.8.3' -#require 'libxml' - -# Is this really needed? -LibXML::XML::Parser.register_error_handler do |message| +# This is required otherwise libxml writes out memory errors to +# the standard output and exits uncleanly +# Changed method due to deprecation of the old register_error_handler +# http://libxml.rubyforge.org/rdoc/classes/LibXML/XML/Parser.html#M000076 +# So set_handler is used instead +# http://libxml.rubyforge.org/rdoc/classes/LibXML/XML/Error.html#M000334 +LibXML::XML::Error.set_handler do |message| raise message end