Merge pull request #9413 from 0penBrain/sheetCyclic

Sheet: display an error in console when a cyclic dependency is detected
This commit is contained in:
Yorik van Havre
2023-05-17 11:30:09 +02:00
committed by GitHub

View File

@@ -1005,8 +1005,9 @@ DocumentObjectExecReturn *Sheet::execute(void)
std::list<Vertex> make_order;
try {
boost::topological_sort(graph, std::front_inserter(make_order));
} catch (std::exception&) {
} catch (std::exception&) { //TODO: evaluate using a more specific exception (not_a_dag)
// Cycle detected; flag all with errors
Base::Console().Error("Cyclic dependency detected in spreadsheet : %s\n", *pcNameInDocument);
std::ostringstream ss;
ss << "Cyclic dependency";
int count = 0;