ProcessMaker-BE "Estandarizando mensajes de error"

- Estandarizando mensajes de error
This commit is contained in:
Victor Saisa Lopez
2014-04-08 13:08:30 -04:00
parent 03a41399cd
commit e1a55649dc
12 changed files with 86 additions and 91 deletions

View File

@@ -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(