PM-444 "0013316: Be able to assign users to different time zone (user's time zone)" SOLVED

Issue:
    PM-444:  0013316: Be able to assign users to different time zone
    PM-3493: Agregar soporte multiple timezone a los endpoints usando formato fecha ISO 8601
Cause:
    New feature
Solution:
    Added functionality for time zone
This commit is contained in:
Victor Saisa Lopez
2015-11-26 20:11:58 -04:00
parent 4879d8089e
commit 6cd975664b
36 changed files with 931 additions and 276 deletions

View File

@@ -169,32 +169,32 @@ class Process
public function throwExceptionIfDataNotMetFieldDefinition($arrayData, $arrayFieldDefinition, $arrayFieldNameForException, $flagValidateRequired = true)
{
try {
\G::LoadSystem('inputfilter');
$filter = new \InputFilter();
if ($flagValidateRequired) {
foreach ($arrayFieldDefinition as $key => $value) {
$fieldName = $key;
$fieldNameAux = (isset($arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]]))? $arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]] : "";
$fieldNameAux = (isset($arrayFieldNameForException[$arrayFieldDefinition[$fieldName]['fieldNameAux']]))? $arrayFieldNameForException[$arrayFieldDefinition[$fieldName]['fieldNameAux']] : $fieldName;
if ($arrayFieldDefinition[$fieldName]["required"] && !isset($arrayData[$fieldName])) {
throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($fieldNameAux)));
throw new \Exception(\G::LoadTranslation('ID_UNDEFINED_VALUE_IS_REQUIRED', [$fieldNameAux]));
}
}
}
$arrayType1 = array("int", "integer", "float", "real", "double", "bool", "boolean", "string", "date", "hour", "datetime");
$arrayType2 = array("array", "object");
$arrayType1 = [
'int', 'integer', 'float', 'real', 'double',
'bool', 'boolean',
'string',
'date', 'hour', 'datetime'
];
$arrayType2 = ['array', 'object'];
foreach ($arrayData as $key => $value) {
$fieldName = $key;
$fieldValue = $value;
if (isset($arrayFieldDefinition[$fieldName])) {
$fieldNameAux = (isset($arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]]))? $arrayFieldNameForException[$arrayFieldDefinition[$fieldName]["fieldNameAux"]] : "";
$fieldNameAux = (isset($arrayFieldNameForException[$arrayFieldDefinition[$fieldName]['fieldNameAux']]))? $arrayFieldNameForException[$arrayFieldDefinition[$fieldName]['fieldNameAux']] : $fieldName;
$arrayFieldDefinition[$fieldName]["type"] = strtolower($arrayFieldDefinition[$fieldName]["type"]);
@@ -205,38 +205,43 @@ class Process
switch ($optionType) {
case 1:
//empty
if (!$arrayFieldDefinition[$fieldName]["empty"] && trim($fieldValue) . "" == "") {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($fieldNameAux)));
if (!$arrayFieldDefinition[$fieldName]['empty'] && trim($fieldValue) == '') {
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_CAN_NOT_BE_EMPTY', [$fieldNameAux]));
}
//defaultValues
if (count($arrayFieldDefinition[$fieldName]["defaultValues"]) > 0 && !in_array($fieldValue, $arrayFieldDefinition[$fieldName]["defaultValues"], true)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES", array($fieldNameAux, implode("|", $arrayFieldDefinition[$fieldName]["defaultValues"]))));
if (isset($arrayFieldDefinition[$fieldName]['defaultValues']) &&
!empty($arrayFieldDefinition[$fieldName]['defaultValues']) &&
!in_array($fieldValue, $arrayFieldDefinition[$fieldName]['defaultValues'], true)
) {
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES', [$fieldNameAux, implode('|', $arrayFieldDefinition[$fieldName]['defaultValues'])]));
}
//type
$fieldValue = (!is_array($fieldValue)) ? $fieldValue : '';
$fieldValue = (!is_array($fieldValue))? $fieldValue : '';
if ($arrayFieldDefinition[$fieldName]["empty"] && $fieldValue . "" == "") {
//
} else {
$regexpDate = "[1-9]\d{3}\-(?:0[1-9]|1[012])\-(?:[0][1-9]|[12][0-9]|3[01])";
$regexpHour = "(?:[0-1]\d|2[0-3])\:(?:[0-5]\d)(?:\:[0-5]\d)?";
$regexpDatetime = $regexpDate . "\s" . $regexpHour;
$regexpDate = \ProcessMaker\Util\DateTime::REGEXPDATE;
$regexpTime = \ProcessMaker\Util\DateTime::REGEXPTIME;
$regexpDatetime = $regexpDate . '\s' . $regexpTime;
switch ($arrayFieldDefinition[$fieldName]["type"]) {
case "date":
if (!preg_match("/^" . $regexpDate . "$/", $fieldValue)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE", array($fieldNameAux)));
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE', [$fieldNameAux]));
}
break;
case "hour":
if (!preg_match("/^" . $regexpHour . "$/", $fieldValue)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE", array($fieldNameAux)));
if (!preg_match('/^' . $regexpTime . '$/', $fieldValue)) {
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE', [$fieldNameAux]));
}
break;
case "datetime":
if (!preg_match("/^" . $regexpDatetime . "$/", $fieldValue)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE", array($fieldNameAux)));
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE', [$fieldNameAux]));
}
break;
}
@@ -251,7 +256,7 @@ class Process
//type
if (!is_array($fieldValue)) {
if ($fieldValue != "" && !preg_match("/^" . $regexpArray1 . ".*" . $regexpArray2 . "$/", $fieldValue)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_THIS_MUST_BE_ARRAY", array($fieldNameAux)));
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_THIS_MUST_BE_ARRAY', [$fieldNameAux]));
}
}
@@ -263,37 +268,38 @@ class Process
$arrayAux = $fieldValue;
}
if (is_string($fieldValue) && trim($fieldValue) . "" != "") {
if (is_string($fieldValue) && trim($fieldValue) != '') {
//eval("\$arrayAux = $fieldValue;");
if (preg_match("/^" . $regexpArray1 . "(.*)" . $regexpArray2 . "$/", $fieldValue, $arrayMatch)) {
if (trim($arrayMatch[1], " ,") != "") {
$arrayAux = array(0);
$arrayAux = [0];
}
}
}
if (count($arrayAux) == 0) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($fieldNameAux)));
if (empty($arrayAux)) {
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_CAN_NOT_BE_EMPTY', [$fieldNameAux]));
}
}
//defaultValues
if (count($arrayFieldDefinition[$fieldName]["defaultValues"]) > 0) {
$arrayAux = array();
if (isset($arrayFieldDefinition[$fieldName]['defaultValues']) &&
!empty($arrayFieldDefinition[$fieldName]['defaultValues'])
) {
$arrayAux = [];
if (is_array($fieldValue)) {
$arrayAux = $fieldValue;
}
if (is_string($fieldValue) && trim($fieldValue) . "" != "") {
$fieldValue = $filter->validateInput($fieldValue);
if (is_string($fieldValue) && trim($fieldValue) != '') {
eval("\$arrayAux = $fieldValue;");
}
foreach ($arrayAux as $value) {
if (!in_array($value, $arrayFieldDefinition[$fieldName]["defaultValues"], true)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES", array($fieldNameAux, implode("|", $arrayFieldDefinition[$fieldName]["defaultValues"]))));
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES', [$fieldNameAux, implode('|', $arrayFieldDefinition[$fieldName]['defaultValues'])]));
}
}
}
@@ -320,10 +326,10 @@ class Process
{
try {
foreach ($arrayData as $key => $value) {
$nameForException = (isset($arrayFieldNameForException[$key]))? $arrayFieldNameForException[$key] : "";
$nameForException = (isset($arrayFieldNameForException[$key]))? $arrayFieldNameForException[$key] : $key;
if (!is_null($value) && ($value . "" == "" || !preg_match("/^(?:\+|\-)?(?:0|[1-9]\d*)$/", $value . "") || (int)($value) < 0)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_EXPECTING_POSITIVE_INTEGER", array($nameForException)));
throw new \Exception(\G::LoadTranslation('ID_INVALID_VALUE_EXPECTING_POSITIVE_INTEGER', [$nameForException]));
}
}
} catch (\Exception $e) {

View File

@@ -32,7 +32,8 @@ class User
"USR_COST_BY_HOUR" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "usrCostByHour"),
"USR_UNIT_COST" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "usrUnitCost"),
/*----------------------------------********---------------------------------*/
"USR_LOGGED_NEXT_TIME" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "usrLoggedNextTime")
'USR_LOGGED_NEXT_TIME' => ['type' => 'int', 'required' => false, 'empty' => false, 'defaultValues' => [0, 1], 'fieldNameAux' => 'usrLoggedNextTime'],
'USR_TIME_ZONE' => ['type' => 'string', 'required' => false, 'empty' => true, 'defaultValues' => [], 'fieldNameAux' => 'usrTimeZone']
);
private $formatFieldNameInUppercase = true;
@@ -295,6 +296,12 @@ class User
throw new \Exception(\G::LoadTranslation("ID_DEPARTMENT_NOT_EXIST", array($this->arrayFieldNameForException["depUid"], $arrayData["DEP_UID"])));
}
}
if (isset($arrayData['USR_TIME_ZONE']) && $arrayData['USR_TIME_ZONE'] != '') {
if (!in_array($arrayData['USR_TIME_ZONE'], \DateTimeZone::listIdentifiers())) {
throw new \Exception(\G::LoadTranslation('ID_TIME_ZONE_DOES_NOT_EXIST', [$this->arrayFieldNameForException['usrTimeZone'], $arrayData['USR_TIME_ZONE']]));
}
}
} catch (\Exception $e) {
throw $e;
}
@@ -343,48 +350,62 @@ class User
$pathPhotoUser = PATH_HOME . "public_html" . PATH_SEP . "images" . PATH_SEP . "user.gif";
}
return array(
$this->getFieldNameByFormatFieldName("USR_UID") => $record["USR_UID"],
$this->getFieldNameByFormatFieldName("USR_USERNAME") => $record["USR_USERNAME"],
//$this->getFieldNameByFormatFieldName("USR_PASSWORD") => $record["USR_PASSWORD"],
$this->getFieldNameByFormatFieldName("USR_FIRSTNAME") => $record["USR_FIRSTNAME"],
$this->getFieldNameByFormatFieldName("USR_LASTNAME") => $record["USR_LASTNAME"],
$this->getFieldNameByFormatFieldName("USR_EMAIL") => $record["USR_EMAIL"],
$this->getFieldNameByFormatFieldName("USR_DUE_DATE") => $record["USR_DUE_DATE"],
$this->getFieldNameByFormatFieldName("USR_CREATE_DATE") => $record["USR_CREATE_DATE"],
$this->getFieldNameByFormatFieldName("USR_UPDATE_DATE") => $record["USR_UPDATE_DATE"],
$this->getFieldNameByFormatFieldName("USR_STATUS") => $record["USR_STATUS"],
$this->getFieldNameByFormatFieldName("USR_COUNTRY") => $record["USR_COUNTRY"],
$this->getFieldNameByFormatFieldName("USR_CITY") => $record["USR_CITY"],
$this->getFieldNameByFormatFieldName("USR_LOCATION") => $record["USR_LOCATION"],
$this->getFieldNameByFormatFieldName("USR_ADDRESS") => $record["USR_ADDRESS"],
$this->getFieldNameByFormatFieldName("USR_PHONE") => $record["USR_PHONE"],
$this->getFieldNameByFormatFieldName("USR_FAX") => $record["USR_FAX"],
$this->getFieldNameByFormatFieldName("USR_CELLULAR") => $record["USR_CELLULAR"],
$this->getFieldNameByFormatFieldName("USR_ZIP_CODE") => $record["USR_ZIP_CODE"],
$this->getFieldNameByFormatFieldName("DEP_UID") => $record["DEP_UID"],
$this->getFieldNameByFormatFieldName("USR_POSITION") => $record["USR_POSITION"],
$this->getFieldNameByFormatFieldName("USR_RESUME") => $record["USR_RESUME"],
$this->getFieldNameByFormatFieldName("USR_BIRTHDAY") => $record["USR_BIRTHDAY"],
$this->getFieldNameByFormatFieldName("USR_ROLE") => $record["USR_ROLE"],
$this->getFieldNameByFormatFieldName("USR_REPORTS_TO") => $record["USR_REPORTS_TO"],
$this->getFieldNameByFormatFieldName("USR_REPLACED_BY") => $record["USR_REPLACED_BY"],
$this->getFieldNameByFormatFieldName("USR_CALENDAR_UID") => $aFields["USR_CALENDAR_UID"],
$this->getFieldNameByFormatFieldName("USR_CALENDAR_NAME") => $aFields["USR_CALENDAR"],
$this->getFieldNameByFormatFieldName("USR_UX") => $record["USR_UX"],
/*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_COST_BY_HOUR") => $record["USR_COST_BY_HOUR"],
$this->getFieldNameByFormatFieldName("USR_UNIT_COST") => $record["USR_UNIT_COST"],
/*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_TOTAL_INBOX") => $record["USR_TOTAL_INBOX"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_DRAFT") => $record["USR_TOTAL_DRAFT"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_CANCELLED") => $record["USR_TOTAL_CANCELLED"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_PARTICIPATED") => $record["USR_TOTAL_PARTICIPATED"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_PAUSED") => $record["USR_TOTAL_PAUSED"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_COMPLETED") => $record["USR_TOTAL_COMPLETED"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_UNASSIGNED") => $record["USR_TOTAL_UNASSIGNED"],
$this->getFieldNameByFormatFieldName("USR_PHOTO_PATH") => $pathPhotoUser
);
$arrayResult = [];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UID')] = $record['USR_UID'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_USERNAME')] = $record['USR_USERNAME'];
//$arrayResult[$this->getFieldNameByFormatFieldName('USR_PASSWORD')] = $record['USR_PASSWORD'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_FIRSTNAME')] = $record['USR_FIRSTNAME'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_LASTNAME')] = $record['USR_LASTNAME'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_EMAIL')] = $record['USR_EMAIL'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_DUE_DATE')] = $record['USR_DUE_DATE'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CREATE_DATE')] = $record['USR_CREATE_DATE'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UPDATE_DATE')] = $record['USR_UPDATE_DATE'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_STATUS')] = $record['USR_STATUS'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_COUNTRY')] = $record['USR_COUNTRY'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CITY')] = $record['USR_CITY'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_LOCATION')] = $record['USR_LOCATION'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_ADDRESS')] = $record['USR_ADDRESS'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_PHONE')] = $record['USR_PHONE'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_FAX')] = $record['USR_FAX'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CELLULAR')] = $record['USR_CELLULAR'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_ZIP_CODE')] = $record['USR_ZIP_CODE'];
$arrayResult[$this->getFieldNameByFormatFieldName('DEP_UID')] = $record['DEP_UID'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_POSITION')] = $record['USR_POSITION'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_RESUME')] = $record['USR_RESUME'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_BIRTHDAY')] = $record['USR_BIRTHDAY'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_ROLE')] = $record['USR_ROLE'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_REPORTS_TO')] = $record['USR_REPORTS_TO'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_REPLACED_BY')] = $record['USR_REPLACED_BY'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CALENDAR_UID')] = $aFields['USR_CALENDAR_UID'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_CALENDAR_NAME')] = $aFields['USR_CALENDAR'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UX')] = $record['USR_UX'];
/*----------------------------------********---------------------------------*/
$arrayResult[$this->getFieldNameByFormatFieldName('USR_COST_BY_HOUR')] = $record['USR_COST_BY_HOUR'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_UNIT_COST')] = $record['USR_UNIT_COST'];
/*----------------------------------********---------------------------------*/
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_INBOX')] = $record['USR_TOTAL_INBOX'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_DRAFT')] = $record['USR_TOTAL_DRAFT'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_CANCELLED')] = $record['USR_TOTAL_CANCELLED'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_PARTICIPATED')] = $record['USR_TOTAL_PARTICIPATED'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_PAUSED')] = $record['USR_TOTAL_PAUSED'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_COMPLETED')] = $record['USR_TOTAL_COMPLETED'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TOTAL_UNASSIGNED')] = $record['USR_TOTAL_UNASSIGNED'];
$arrayResult[$this->getFieldNameByFormatFieldName('USR_PHOTO_PATH')] = $pathPhotoUser;
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
$userTimeZone = $record['USR_TIME_ZONE'];
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = \System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone'];
}
$arrayResult[$this->getFieldNameByFormatFieldName('USR_TIME_ZONE')] = $userTimeZone;
}
//Return
return $arrayResult;
} catch (\Exception $e) {
throw $e;
}
@@ -437,7 +458,9 @@ class User
$criteria->addSelectColumn(\UsersPeer::USR_TOTAL_PAUSED);
$criteria->addSelectColumn(\UsersPeer::USR_TOTAL_COMPLETED);
$criteria->addSelectColumn(\UsersPeer::USR_TOTAL_UNASSIGNED);
$criteria->addSelectColumn(\UsersPeer::USR_TIME_ZONE);
//Return
return $criteria;
} catch (\Exception $e) {
throw $e;
@@ -1250,5 +1273,28 @@ class User
throw $e;
}
}
/**
* Get User-Logged Time Zone
*
* @return string Return the User-Logged Time Zone; Time Zone system settings otherwise
*/
public static function getUserLoggedTimeZone()
{
try {
$timeZone = 'UTC';
if (isset($_SESSION['USR_TIME_ZONE'])) {
$tz = trim($_SESSION['USR_TIME_ZONE']);
$timeZone = ($tz != '')? $tz : $timeZone;
}
//Return
return $timeZone;
} catch (\Exception $e) {
throw $e;
}
}
}

View File

@@ -328,5 +328,51 @@ class Validator
throw $e;
}
}
/**
* Validate data by ISO 8601 format
*
* @param mixed $data Data
* @param mixed $field Fields
*
* @return void Throw exception if data has an invalid value
*/
public static function throwExceptionIfDataNotMetIso8601Format($data, $field = null)
{
try {
if (!(isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])) {
return;
}
$regexpDate = \ProcessMaker\Util\DateTime::REGEXPDATE;
$regexpTime = \ProcessMaker\Util\DateTime::REGEXPTIME;
$regexpIso8601 = $regexpDate . 'T' . $regexpTime . '[\+\-]\d{2}:\d{2}';
switch (gettype($data)) {
case 'string':
if (trim($data) != '' && !preg_match('/^' . $regexpIso8601 . '$/', $data)) {
throw new \Exception(\G::LoadTranslation('ID_ISO8601_INVALID_FORMAT', [(!is_null($field) && is_string($field))? $field : $data]));
}
break;
case 'array':
if (!is_null($field) && is_array($field)) {
foreach ($field as $value) {
$fieldName = $value;
$fieldName = (isset($data[strtoupper($fieldName)]))? strtoupper($fieldName) : $fieldName;
$fieldName = (isset($data[strtolower($fieldName)]))? strtolower($fieldName) : $fieldName;
if (isset($data[$fieldName]) && trim($data[$fieldName]) != '' && !preg_match('/^' . $regexpIso8601 . '$/', $data[$fieldName])) {
throw new \Exception(\G::LoadTranslation('ID_ISO8601_INVALID_FORMAT', [$fieldName]));
}
}
}
break;
}
} catch (\Exception $e) {
throw $e;
}
}
}