[solver] Improve messages for edge cases (No equation, no solution...)

This commit is contained in:
Émilie Feral
2018-06-04 17:10:45 +02:00
parent 28a4777c58
commit dcdd2a9b9a
7 changed files with 37 additions and 12 deletions

View File

@@ -69,7 +69,13 @@ I18n::Message SolutionsController::emptyMessage() {
if (m_equationStore->numberOfSolutions() == INT_MAX) {
return I18n::Message::InfiniteNumberOfSolutions;
}
return I18n::Message::NoSolution;
if (m_equationStore->type() == EquationStore::Type::Monovariable) {
return I18n::Message::NoSolutionInterval;
}
if (m_equationStore->numberOfModels() <= 1) {
return I18n::Message::NoSolutionEquation;
}
return I18n::Message::NoSolutionSystem;
}
Responder * SolutionsController::defaultController() {