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

Version Path
nokogiri-1.18.1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.18.0-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.18.0.rc1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.17.2-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.17.1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.17.0-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.15.7-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.8-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.7-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.6-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.4-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.15.6-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.3-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.2-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.0-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.16.0.rc1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
Nokogiri_precompiled_aarch64_dedshit-1.14.5 ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.15.5-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.15.4-java ext/java/nokogiri/internals/SchemaErrorHandler.java