Commit aac66378 authored by Alexis Lebis's avatar Alexis Lebis

CSDVP bad config protection ++

parent 136dfac7
...@@ -158,7 +158,8 @@ int CSDVP::CSDVP_COUNTER = 0; ...@@ -158,7 +158,8 @@ int CSDVP::CSDVP_COUNTER = 0;
throw CSDVPBadlyConfiguratedException("this->_quantityAvailableCompetencies < this->_maximalCompetencyByCourse"); throw CSDVPBadlyConfiguratedException("this->_quantityAvailableCompetencies < this->_maximalCompetencyByCourse");
if(this->_pickedCoursesByTimeFrame > this->_minimalCoursesByTimeFrame) if(this->_pickedCoursesByTimeFrame > this->_minimalCoursesByTimeFrame)
throw CSDVPBadlyConfiguratedException("this->_pickedCoursesByTimeFrame > this->_minimalCoursesByTimeFrame"); throw CSDVPBadlyConfiguratedException("this->_pickedCoursesByTimeFrame > this->_minimalCoursesByTimeFrame");
if(this->_pickedCoursesByTimeFrame * ( (this->_maximalTimeFrame - this->_minimalTimeFrame) + 1) > this->_quantityAvailableCourses)
throw CSDVPBadlyConfiguratedException("this->_pickedCoursesByTimeFrame * ( (this->_maximalTimeFrame - this->_minimalTimeFrame) + 1) > this->_quantityAvailableCourses");
this->_isConfig = true; this->_isConfig = true;
return this->_isConfig; return this->_isConfig;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment