1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

Removed all System.exit() calls (related to #182)

Most calls were replaced by Runtime exceptions. This gives the client
some opportuinity to respond to the exceptions.
This commit is contained in:
Heinrich Filter 2015-09-28 10:15:53 +02:00
parent e25b61cac4
commit 21c7d2bf83
12 changed files with 24 additions and 76 deletions

View file

@ -107,9 +107,7 @@ public class ChristofidesReader {
try {
reader.close();
} catch (IOException e) {
e.printStackTrace();
logger.error("Exception:", e);
System.exit(1);
throw new RuntimeException(e);
}
}
@ -117,10 +115,7 @@ public class ChristofidesReader {
try {
return reader.readLine();
} catch (IOException e) {
e.printStackTrace();
logger.error("Exception:", e);
System.exit(1);
return null;
throw new RuntimeException(e);
}
}
@ -135,9 +130,7 @@ public class ChristofidesReader {
try {
reader = new BufferedReader(new FileReader(solomonFile));
} catch (FileNotFoundException e1) {
e1.printStackTrace();
logger.error("Exception:", e1);
System.exit(1);
throw new RuntimeException(e1);
}
return reader;
}