Changeset 32176


Ignore:
Timestamp:
05/08/18 22:34:18 (3 years ago)
Author:
Georgiy Litvinov
Message:

Safe read from group config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/CollectionGroups.java

    r32115 r32176  
    363363            return false;
    364364        }
    365         // Try to read and catch exception if it fails
    366         Document doc = XMLConverter.getDOM(configFile);
    367         Element content = doc.getDocumentElement();
    368        
     365        Document doc;
     366        Element content;
     367        try {
     368            doc = XMLConverter.getDOM(configFile);
     369            content = doc.getDocumentElement();
     370        } catch (Exception e) {
     371            System.out.println(e.getClass());
     372            e.printStackTrace();
     373            return false;
     374        }
    369375        // XPath to find empty text nodes.
    370376        try {
Note: See TracChangeset for help on using the changeset viewer.