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

@@ -74,11 +74,11 @@ class CaseTrackerObject
}
if (!isset($arrayData["CTO_TYPE_OBJ"])) {
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_TYPE_OBJ")), "The \"{0}\" attribute is not defined")));
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_TYPE_OBJ")), "Undefined value for \"{0}\", it is required.")));
}
if (!isset($arrayData["CTO_UID_OBJ"])) {
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_UID_OBJ")), "The \"{0}\" attribute is not defined")));
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_UID_OBJ")), "Undefined value for \"{0}\", it is required.")));
}
$step = new \ProcessMaker\BusinessModel\Step();
@@ -148,11 +148,11 @@ class CaseTrackerObject
}
if (isset($arrayData["CTO_TYPE_OBJ"]) && !isset($arrayData["CTO_UID_OBJ"])) {
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_UID_OBJ")), "The \"{0}\" attribute is not defined")));
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_UID_OBJ")), "Undefined value for \"{0}\", it is required.")));
}
if (!isset($arrayData["CTO_TYPE_OBJ"]) && isset($arrayData["CTO_UID_OBJ"])) {
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_TYPE_OBJ")), "The \"{0}\" attribute is not defined")));
throw (new \Exception(str_replace(array("{0}"), array(strtolower("CTO_TYPE_OBJ")), "Undefined value for \"{0}\", it is required.")));
}
if (isset($arrayData["CTO_TYPE_OBJ"]) && isset($arrayData["CTO_UID_OBJ"])) {
@@ -324,7 +324,8 @@ class CaseTrackerObject
*
* @return void
*/
public function moveCaseTrackerObject($cto_uid, $pro_uid, $cto_pos) {
public function moveCaseTrackerObject($cto_uid, $pro_uid, $cto_pos)
{
$aCaseTrackerObject = CaseTracker::getCaseTrackerObjects($pro_uid);
foreach ($aCaseTrackerObject as $dataCaseTracker) {