On Fri, Jul 11, 2008 at 11:47 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> 130 tests, 716 assertions, 1 failures, 0 errors >>> rake aborted! >>> Command failed with status (1): [/opt/local/bin/ruby -Ilib:test:ext >>> "/opt/l...] >>> >>> (See full trace by running task with --trace) >>> Exit 1 >> >> Yes, I think that is because of the implementation of >> register_error_handler. I had fixed this in one of my previous >> patches.... Anyway, this seems to do the trick: > > Yup, that fixes things... the output is all over the place. Hrm, this works > better but is a change in behavior. I just committed the following (NOTE, > this is a change in behavior and I am willing to revert this, but think this > is a step forward, albeit an API change): > > Clean up the error handling a bit and change the arguments for > register_error_handler. > > If XML::Parser.register_error_handler() is nil or false, error messages will > be dropped on the floor. > > If XML::Parser.register_error_handler() is true, it will print to stderr. > > If XML::Parser.register_error_handler() is anything else, it will call the > proc. For example: > > XML::Parser.register_error_handler(lambda {|msg| p msg }) > > > Ideally, I'd like it if XML::Parser.register_error_handler() would accept an > IO object that the library would print to, but that's just a nicety (e.g. > XML::Parser.register_error_handler($stdout)). -sc
Ask and you shall receive Sean, I've submitted a patch that moves register_error_handler from C to Ruby, and lets you pass an IO object where error message may be written. http://rubyforge.org/tracker/index.php?func=detail&aid=21174&group_id=494&atid=1973 -- Aaron Patterson http://tenderlovemaking.com/ _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel