Ignore:
Timestamp:
2018-09-03T16:08:35+12:00 (6 years ago)
Author:
ak19
Message:

ProtocolPortProperties.java constructors can throw an Exception now.

File:
1 edited

Legend:

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

    r32357 r32419  
    142142        Properties globalProperties = new Properties();
    143143        globalProperties.load(Class.forName("org.greenstone.util.GlobalProperties").getClassLoader().getResourceAsStream("global.properties"));
     144       
     145        ProtocolPortProperties protocolPortProps = new ProtocolPortProperties(globalProperties); // can throw Exception
    144146        String host = globalProperties.getProperty("tomcat.server", "localhost");
    145         ProtocolPortProperties protocolPortProps = new ProtocolPortProperties(globalProperties);
    146         if(protocolPortProps.hadError()) {
    147         logger.error("Error with port/protocol in global.properties: " + protocolPortProps.getErrorMsg());
    148         return false; // configure has failed
    149         }
    150147        String protocol = protocolPortProps.getProtocol();
    151148        String port = protocolPortProps.getPort();
     
    185182    } catch(Exception e) {
    186183        logger.error("Error instantiating the interface to the Fedora Repository:\n", e); // second parameter prints e's stacktrace
    187         return false;
     184        return false; // configure has failed
    188185    }
    189186
Note: See TracChangeset for help on using the changeset viewer.