Changeset 8148 for trunk/gli


Ignore:
Timestamp:
2004-09-24T11:55:24+12:00 (20 years ago)
Author:
mdewsnip
Message:

When attempting to parse an XML file, now checks that the file exists first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r8086 r8148  
    13111311    Document document = null;
    13121312    try {
    1313         Gatherer.println("Parsing XML file: " + file);
    1314         FileInputStream fis   = new FileInputStream(file);
    1315         document = parse(fis,noisey);
    1316         file = null;
     1313        if (file.exists()) {
     1314        Gatherer.println("Parsing XML file: " + file);
     1315        FileInputStream fis = new FileInputStream(file);
     1316        document = parse(fis, noisey);
     1317        }
    13171318    }
    13181319    catch (Exception error) {
Note: See TracChangeset for help on using the changeset viewer.