Sha256: fdd8c4315dace3cb30f1f3239232ebc9941b8e85b786face272a016d5d22e1c0
Contents?: true
Size: 1.01 KB
Versions: 23
Compression:
Stored size: 1.01 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
23 entries across 23 versions & 1 rubygems