fixed config to not fail if vm option is not specified
This commit is contained in:
@@ -22,10 +22,12 @@ import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class FdaqConfiguration {
|
||||
|
||||
public final static String FDAQ_CONFIG = "ch.psi.fda.fdaq.config.file";
|
||||
private static final Logger logger = Logger.getLogger(FdaqConfiguration.class.getName());
|
||||
private final static String FDAQ_CONFIG = "ch.psi.fda.fdaq.config.file";
|
||||
|
||||
private String hostname = "mchip015.psi.ch";
|
||||
private int port = 2233;
|
||||
@@ -38,7 +40,7 @@ public class FdaqConfiguration {
|
||||
loadFile(new File(config));
|
||||
}
|
||||
else{
|
||||
throw new RuntimeException("No configuration file specified via -D"+FDAQ_CONFIG+"=...");
|
||||
logger.warning("No configuration file specified via -D"+FDAQ_CONFIG+"=... - using defaults");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user