SDK: warn if given path translates to no selected tasks

This commit is contained in:
Alexey Rybalchenko
2020-07-02 12:57:31 +02:00
committed by Dennis Klein
parent 78b1c188bf
commit 5a7dcd9fc1
2 changed files with 25 additions and 12 deletions

View File

@@ -439,6 +439,9 @@ class BasicTopology : public AsioBase<Executor, Allocator>
}
});
}
if (fTasks.empty()) {
FAIR_LOG(warn) << "ChangeState initiated on an empty set of tasks, check the path argument.";
}
}
ChangeStateOp() = delete;
ChangeStateOp(const ChangeStateOp&) = delete;
@@ -741,6 +744,9 @@ class BasicTopology : public AsioBase<Executor, Allocator>
}
});
}
if (fTasks.empty()) {
FAIR_LOG(warn) << "WaitForState initiated on an empty set of tasks, check the path argument.";
}
}
WaitForStateOp() = delete;
WaitForStateOp(const WaitForStateOp&) = delete;
@@ -938,6 +944,9 @@ class BasicTopology : public AsioBase<Executor, Allocator>
}
});
}
if (expectedCount == 0) {
FAIR_LOG(warn) << "GetProperties initiated on an empty set of tasks, check the path argument.";
}
// FAIR_LOG(debug) << "GetProperties " << fId << " with expected count of " << fExpectedCount << " started.";
}
GetPropertiesOp() = delete;
@@ -1093,6 +1102,9 @@ class BasicTopology : public AsioBase<Executor, Allocator>
}
});
}
if (expectedCount == 0) {
FAIR_LOG(warn) << "SetProperties initiated on an empty set of tasks, check the path argument.";
}
// FAIR_LOG(debug) << "SetProperties " << fId << " with expected count of " << fExpectedCount << " started.";
}
SetPropertiesOp() = delete;