]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Raise correct exception in Launcher when maximum_duration parameter does not contain ':'
authorbarate <barate>
Mon, 16 Jan 2012 10:06:13 +0000 (10:06 +0000)
committerbarate <barate>
Mon, 16 Jan 2012 10:06:13 +0000 (10:06 +0000)
src/Launcher/Launcher_Job.cxx

index 77cb72f4ec531eabfb28d7b44f1416a5b4924338..2841a4afd1e21334364f4a0d44d7854ad4c73bc3 100644 (file)
@@ -339,6 +339,9 @@ Launcher::Job::checkMaximumDuration(const std::string & maximum_duration)
   std::size_t pos = edt_value.find(":");
 
   if (edt_value != "") {
+    if (pos == edt_value.npos) {
+      throw LauncherException("[Launcher::Job::checkMaximumDuration] Error on definition: " + edt_value);
+    }
     std::string begin_edt_value = edt_value.substr(0, pos);
     std::string mid_edt_value = edt_value.substr(pos, 1);
     std::string end_edt_value = edt_value.substr(pos + 1, edt_value.npos);