Add error handling for avoid not implemented
This commit is contained in:
committed by
Patrick Niklaus
parent
20e4096c4b
commit
f93b331817
@@ -120,6 +120,9 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
json_result);
|
||||
}
|
||||
|
||||
if (!CheckAlgorithms(parameters, algorithms, json_result))
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
|
||||
BOOST_ASSERT(parameters.IsValid());
|
||||
|
||||
@@ -25,6 +25,9 @@ Status NearestPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms
|
||||
{
|
||||
BOOST_ASSERT(params.IsValid());
|
||||
|
||||
if (!CheckAlgorithms(params, algorithms, json_result))
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
|
||||
if (max_results > 0 &&
|
||||
|
||||
@@ -66,6 +66,9 @@ Status TablePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
return Error("TooBig", "Too many table coordinates", result);
|
||||
}
|
||||
|
||||
if (!CheckAlgorithms(params, algorithms, result))
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
auto phantom_nodes = GetPhantomNodes(facade, params);
|
||||
|
||||
|
||||
@@ -191,6 +191,9 @@ Status TripPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
return Error("InvalidValue", "Invalid coordinate value.", json_result);
|
||||
}
|
||||
|
||||
if (!CheckAlgorithms(parameters, algorithms, json_result))
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
auto phantom_node_pairs = GetPhantomNodes(facade, parameters);
|
||||
if (phantom_node_pairs.size() != number_of_locations)
|
||||
|
||||
@@ -73,6 +73,9 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
||||
return Error("InvalidValue", "Invalid coordinate value.", json_result);
|
||||
}
|
||||
|
||||
if (!CheckAlgorithms(route_parameters, algorithms, json_result))
|
||||
return Status::Error;
|
||||
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
auto phantom_node_pairs = GetPhantomNodes(facade, route_parameters);
|
||||
if (phantom_node_pairs.size() != route_parameters.coordinates.size())
|
||||
|
||||
Reference in New Issue
Block a user