Skip to content

Commit

Permalink
restored old error messages when parsing broken network. refs #21, #6852
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 19, 2020
1 parent ef7eb62 commit 9f2346b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/netload/NLHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ NLHandler::beginEdgeParsing(const SUMOSAXAttributes& attrs) {
}
// parse the function
const SumoXMLEdgeFunc func = attrs.getEdgeFunc(ok);
if (!ok) {
WRITE_ERROR("Edge '" + id + "' has an invalid type.");
myCurrentIsBroken = true;
}
// omit internal edges if not wished
if (id[0] == ':') {
myHaveSeenInternalEdge = true;
Expand All @@ -370,17 +374,12 @@ NLHandler::beginEdgeParsing(const SUMOSAXAttributes& attrs) {
myJunctionGraph[id] = std::make_pair(
attrs.get<std::string>(SUMO_ATTR_FROM, id.c_str(), ok),
attrs.get<std::string>(SUMO_ATTR_TO, id.c_str(), ok));
if (!ok) {
myCurrentIsBroken = true;
return;
}
}
myCurrentIsInternalToSkip = false;
if (!ok) {
WRITE_ERROR("Edge '" + id + "' has an invalid type.");
myCurrentIsBroken = true;
return;
}
myCurrentIsInternalToSkip = false;
// get the street name
const std::string streetName = attrs.getOpt<std::string>(SUMO_ATTR_NAME, id.c_str(), ok, "");
// get the edge type
Expand Down

0 comments on commit 9f2346b

Please sign in to comment.