Changeset 13337 for trunk/gli


Ignore:
Timestamp:
2006-11-24T14:54:02+13:00 (17 years ago)
Author:
mdewsnip
Message:

Now catches any exceptions thrown in DocXMLFile.skimFile() so errors in the doc.xml files don't stop the collection from loading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/metadata/DocXMLFileManager.java

    r8164 r13337  
    3030import java.io.*;
    3131import java.util.*;
     32import org.greenstone.gatherer.DebugStream;
    3233
    3334
     
    8384    {
    8485    DocXMLFile doc_xml_file = new DocXMLFile(doc_xml_file_file.getAbsolutePath());
    85     doc_xml_file.skimFile();
    86     doc_xml_files.add(doc_xml_file);
     86    try {
     87        doc_xml_file.skimFile();
     88        doc_xml_files.add(doc_xml_file);
     89    }
     90    catch (Exception exception) {
     91        // We catch any exceptions here so errors in doc.xml files don't stop the collection from loading
     92        System.err.println("Error: Could not skim doc.xml file " + doc_xml_file.getAbsolutePath());
     93        DebugStream.printStackTrace(exception);
     94    }
    8795    }
    8896}
Note: See TracChangeset for help on using the changeset viewer.