You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Andrew Nielsen <Go...@hotmail.com> on 2001/01/19 23:17:37 UTC

DEFECT - DOMParser.parse does not throw IOException.

I wrote a IOExcption throwing Reader:

class IOExceptionThrowingReader extends Reader {
    public int read(char[] cbuf, int off, int len) throws IOException {
        throw new IOException(
            "From MockReader, a package level class in BuildDataSetTest.java");
    }
     
    public void close() {}
}

and did a:

    IOExceptionThrowingReader input = new IOExceptionThrowingReader();
         
    try {
        Document doc = BuildDataSet.parseInput(input);
    } catch (IOException e) {
        System.out.println("I never get here");
    } catch (SAXException se) {
        System.out.println(But, I do get here.  Why?");
    }

I am using Xerces 1.2.3 with and JDK 1.3.

Looks like a bug.<br clear=all><hr>Get your FREE download of MSN Explorer at <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p>