Skip to content

Commit

Permalink
Adjust the error msg in 1930973
Browse files Browse the repository at this point in the history
  • Loading branch information
minhduc0711 committed Aug 3, 2021
1 parent 1930973 commit 9cb7dda
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1192,13 +1192,13 @@ public IPath primComputePath(final IScope scope) throws GamaRuntimeException {

if (target != null) {
if (!graph.vertexSet().contains(target)) {
throw GamaRuntimeException.error(target.getName() + " is not a vertex in the given graph", scope);
throw GamaRuntimeException.error(target.getName() + " must be a vertex in the given graph", scope);
}

if (source == null) {
source = (IAgent) Queries.closest_to(scope, graph.getVertices(), vehicle);
} else if (!graph.vertexSet().contains(source)) {
throw GamaRuntimeException.error(source.getName() + " is not a vertex in the given graph", scope);
throw GamaRuntimeException.error(source.getName() + " must be a vertex in the given graph", scope);
}
path = graph.computeShortestPathBetween(scope, source, target);
} else if (nodes != null && !nodes.isEmpty()) {
Expand Down

0 comments on commit 9cb7dda

Please sign in to comment.