[refactor][style] Removed redundant try-catch and updated error message
@@ -144,7 +144,6 @@ public class OCLCodeCache {
fileReader = new FileReader(new File("").getAbsolutePath() + ((deviceContext.getDevice().getDeviceVendor().toLowerCase().equals("xilinx")) ? "/etc/xilinx-fpga.conf" : "/etc/intel-fpga.conf"));
bufferedReader = new BufferedReader(fileReader);
String line;
- try {
while ((line=bufferedReader.readLine()) != null) {
switch (line.split("=")[0]) {
case "DEVICE_NAME":
@@ -163,10 +162,7 @@ public class OCLCodeCache {
}
}
} catch (IOException e) {
- e.printStackTrace();
- }
- } catch (IOException e) {
- System.out.println("Wrong configuration file, please ensure that you have configured the file with valid settings!");
+ System.out.println("Wrong configuration file or invalid settings. Please ensure that you have configured the configuration file with valid options!");
System.exit(1);
}
}
