Sha256: b02d463a780b3b11ada3fd5bd504724dce86af0984a0ad29069b31f9a47ae036
Contents?: true
Size: 1.02 KB
Versions: 31
Compression:
Stored size: 1.02 KB
Contents
package nokogiri.internals; import static nokogiri.internals.NokogiriHelpers.getNokogiriClass; import nokogiri.NokogiriService; import nokogiri.XmlSyntaxError; import org.jruby.Ruby; import org.jruby.RubyArray; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; /** * Error handler for Relax and W3C XML Schema. * * @author sergio * @author Yoko Harada <yokolet@gmail.com> */ public class SchemaErrorHandler implements ErrorHandler { private final Ruby runtime; final RubyArray<?> errors; public SchemaErrorHandler(Ruby ruby, RubyArray<?> array) { this.runtime = ruby; this.errors = array; } public void warning(SAXParseException ex) throws SAXException { errors.append(XmlSyntaxError.createWarning(runtime, ex)); } public void error(SAXParseException ex) throws SAXException { errors.append(XmlSyntaxError.createError(runtime, ex)); } public void fatalError(SAXParseException ex) throws SAXException { throw ex; } }
Version data entries
31 entries across 31 versions & 2 rubygems