Code example for DefaultHandler

Methods: error

0
        } 
    } 
 
    public void testError() { 
        try { 
            h.error(new SAXParseException("Foo", new LocatorImpl()));
        } catch (SAXException e) {
            throw new RuntimeException(e);
        } 
    } 
 
    public void testFatalError() { 
        // Ordinary case 
        try { 
            h.fatalError(new SAXParseException("Foo", new LocatorImpl()));
            fail("SAXException expected");
        } catch (SAXException e) {
            // Expected 
        }