Throw a logic_error if the CXX layer's EdgeType variant is unrecognised

This commit is contained in:
Oliver Hamlet
2025-08-12 19:10:01 +01:00
parent 27c57527d7
commit e8c150f7f4
+4 -1
View File
@@ -34,7 +34,10 @@ std::optional<loot::EdgeType> convert(loot::rust::EdgeType edgeType) {
case loot::rust::EdgeType::None:
return std::nullopt;
default:
return std::nullopt;
throw std::logic_error(
"Unrecognised EdgeType: " +
std::to_string(
std::underlying_type_t<loot::rust::EdgeType>(edgeType)));
}
}
}