Catch and report errors during osrm-contract tests.

This commit is contained in:
Daniel Patterson
2016-08-05 14:19:22 -07:00
parent b161e10b73
commit 176c2244ad
4 changed files with 59 additions and 18 deletions
+2 -1
View File
@@ -339,7 +339,8 @@ module.exports = function () {
};
this.reprocessAndLoadData = (callback) => {
this.reprocess(() => {
this.reprocess((e) => {
if (e) return callback(e);
this.OSRMLoader.load(util.format('%s.osrm', this.osmData.contractedFile), callback);
});
};
+2 -1
View File
@@ -24,7 +24,8 @@ module.exports = function () {
};
this.WhenIRouteIShouldGet = (table, callback) => {
this.reprocessAndLoadData(() => {
this.reprocessAndLoadData((e) => {
if (e) return callback(e);
var headers = new Set(table.raw()[0]);
var requestRow = (row, ri, cb) => {