X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3f30bc53f543e13221ba0b7c52284865f9593107..5c0aeb1558a778cd5790be5e062c2df7d9b51da6:/config/initializers/libxml.rb?ds=sidebyside diff --git a/config/initializers/libxml.rb b/config/initializers/libxml.rb index 22f429da5..07f79660f 100644 --- a/config/initializers/libxml.rb +++ b/config/initializers/libxml.rb @@ -1,5 +1,5 @@ -require 'rubygems' -gem 'libxml-ruby', '>= 0.8.3' -require 'libxml' - -LibXML::XML::Parser.register_error_handler(proc{}) +# This is required otherwise libxml writes out memory errors to +# the standard output and exits uncleanly +LibXML::XML::Error.set_handler do |message| + raise message +end