mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge pull request #189 from HeinrichFilter/master
Removed all System.exit() calls (related to #182)
This commit is contained in:
commit
ca86a6651b
12 changed files with 24 additions and 76 deletions
|
|
@ -77,9 +77,7 @@ public class AlgorithmConfigXmlReader {
|
|||
try {
|
||||
algorithmConfig.getXMLConfiguration().load();
|
||||
} catch (ConfigurationException e) {
|
||||
log.error(e);
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -519,7 +519,6 @@ public class VehicleRoutingAlgorithms {
|
|||
@Override
|
||||
public void uncaughtException(Thread arg0, Throwable arg1) {
|
||||
System.err.println(arg1.toString());
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
|
|
|
|||
|
|
@ -130,9 +130,7 @@ public final class BestInsertionConcurrent extends AbstractInsertionStrategy {
|
|||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
} catch (ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Exception", e);
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
VehicleRoute newRoute = VehicleRoute.emptyRoute();
|
||||
InsertionData newIData = bestInsertionCostCalculator.getInsertionData(newRoute, unassignedJob, NO_NEW_VEHICLE_YET, NO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, bestInsertionCost);
|
||||
|
|
|
|||
|
|
@ -163,9 +163,7 @@ public class VrpXMLReader {
|
|||
try {
|
||||
xmlConfig.load();
|
||||
} catch (ConfigurationException e) {
|
||||
logger.error("Exception:", e);
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
readProblemType(xmlConfig);
|
||||
readVehiclesAndTheirTypes(xmlConfig);
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@ public class VrpXMLWriter {
|
|||
element.setAttribute("xsi:schemaLocation", "http://www.w3schools.com vrp_xml_schema.xsd");
|
||||
|
||||
} catch (ConfigurationException e) {
|
||||
logger.error("Exception:", e);
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
@ -128,9 +126,7 @@ public class VrpXMLWriter {
|
|||
serializer.serialize(xmlConfig.getDocument());
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
logger.error("Exception:", e);
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue