< prev index next >

test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java

Print this page




  28 import org.xml.sax.helpers.DefaultHandler;
  29 
  30 public class Bug6573786ErrorHandler extends DefaultHandler {
  31     public boolean fail = false;
  32 
  33     public void fatalError(SAXParseException e) throws SAXException {
  34         System.out.println(e.getMessage());
  35         if (e.getMessage().indexOf("bad_value") < 0) {
  36             fail = true;
  37         }
  38     } // fatalError ()
  39 
  40     public void error(SAXParseException e) throws SAXException {
  41         System.out.println(e.getMessage());
  42     } // error ()
  43 
  44     public void warning(SAXParseException e) throws SAXException {
  45         System.out.println(e.getMessage());
  46     } // warning ()
  47 }
  48 


  28 import org.xml.sax.helpers.DefaultHandler;
  29 
  30 public class Bug6573786ErrorHandler extends DefaultHandler {
  31     public boolean fail = false;
  32 
  33     public void fatalError(SAXParseException e) throws SAXException {
  34         System.out.println(e.getMessage());
  35         if (e.getMessage().indexOf("bad_value") < 0) {
  36             fail = true;
  37         }
  38     } // fatalError ()
  39 
  40     public void error(SAXParseException e) throws SAXException {
  41         System.out.println(e.getMessage());
  42     } // error ()
  43 
  44     public void warning(SAXParseException e) throws SAXException {
  45         System.out.println(e.getMessage());
  46     } // warning ()
  47 }

< prev index next >