ProcessMaker-BE "Estandarizando mensajes de error"
- Estandarizando mensajes de error
This commit is contained in:
@@ -221,7 +221,7 @@ class Calendar
|
||||
$obj = \CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
|
||||
if (!(is_object($obj) && get_class($obj) == "CalendarDefinition")) {
|
||||
$msg = str_replace(array("{0}", "{1}"), array($fieldNameForException, $calendarUid), "The calendar with {0}: {1} does not exists");
|
||||
$msg = str_replace(array("{0}", "{1}"), array($fieldNameForException, $calendarUid), "The calendar with {0}: {1} does not exist.");
|
||||
|
||||
throw (new \Exception($msg));
|
||||
}
|
||||
@@ -301,7 +301,7 @@ class Calendar
|
||||
if (isset($arrayData["CAL_WORK_HOUR"])) {
|
||||
foreach ($arrayData["CAL_WORK_HOUR"] as $value) {
|
||||
if ($value["DAY"] != "ALL" && !in_array($value["DAY"], $arrayData["CAL_WORK_DAYS"])) {
|
||||
throw (new \Exception(str_replace(array("{0}", "{1}"), array($this->arrayWorkHourFieldNameForException["day"], $this->arrayFieldNameForException["calendarWorkDays"]), "Value specified for \"{0}\" does not exists in \"{1}\"")));
|
||||
throw (new \Exception(str_replace(array("{0}", "{1}"), array($this->arrayWorkHourFieldNameForException["day"], $this->arrayFieldNameForException["calendarWorkDays"]), "Value specified for \"{0}\" does not exist in \"{1}\".")));
|
||||
}
|
||||
|
||||
$arrayCalendarWorkHour[] = array(
|
||||
@@ -408,7 +408,7 @@ class Calendar
|
||||
|
||||
foreach ($arrayAux as $value) {
|
||||
if (isset($arrayData["CAL_WORK_HOUR"]) && $value["DAY"] != "ALL" && !in_array($value["DAY"], $calendarWorkDays)) {
|
||||
throw (new \Exception(str_replace(array("{0}", "{1}"), array($this->arrayWorkHourFieldNameForException["day"], $this->arrayFieldNameForException["calendarWorkDays"]), "Value specified for \"{0}\" does not exists in \"{1}\"")));
|
||||
throw (new \Exception(str_replace(array("{0}", "{1}"), array($this->arrayWorkHourFieldNameForException["day"], $this->arrayFieldNameForException["calendarWorkDays"]), "Value specified for \"{0}\" does not exist in \"{1}\".")));
|
||||
}
|
||||
|
||||
$arrayCalendarWorkHour[] = array(
|
||||
|
||||
Reference in New Issue
Block a user