Project

Profile

Help

Revision d4e80993

Added by Michael Kay over 12 years ago

Fix bug 2859878 Second attempt to read bad document is not recoverable

View differences:

latest9.2/hej/net/sf/saxon/functions/Document.java
276 276
            return getFragment(doc, fragmentId, c);
277 277
        }
278 278

  
279
        if (pool.isMarkedUnavailable(documentKey)) {
280
            XPathException err = new XPathException(
281
                    "Document has been marked not available: " + documentKey);
282
            err.setXPathContext(c);
283
            err.setErrorCode("FODC0005");
284
            throw err;
285
        }
286

  
287 279
        // check that the document was not written by this transformation
288 280

  
289 281
        if (!controller.checkUniqueOutputDestination(documentKey)) {
......
296 288
        }
297 289

  
298 290
        try {
291

  
292
            if (pool.isMarkedUnavailable(documentKey)) {
293
                XPathException err = new XPathException(
294
                        "Document has been marked not available: " + documentKey);
295
                err.setXPathContext(c);
296
                err.setErrorCode("FODC0005");
297
                throw err;
298
            }
299
            
299 300
            // Get a Source from the URIResolver
300 301

  
301 302
            Source source = resolveURI(href, baseURI, documentKey, controller);

Also available in: Unified diff