]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/libxml.rb
Renaming the include action to expand_bbox in the changeset controller.
[rails.git] / config / initializers / libxml.rb
index 4f71b6d0fd42ef0bad5b294a46d43633db46fb61..ae636a9a31039a260539fd2d195fa49e9ce56684 100644 (file)
@@ -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