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

Version Path
nokogiri-1.13.10-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.9-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.8-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.7-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.6-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.5-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.4-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.3-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.2-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.13.0-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.5-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.4-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.3-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.2-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.0-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.12.0.rc1-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.11.7-java ext/java/nokogiri/internals/SchemaErrorHandler.java
nokogiri-1.11.6-java ext/java/nokogiri/internals/SchemaErrorHandler.java