detailed loop error
This commit is contained in:
@@ -117,6 +117,9 @@ abstract class BaseLoop
|
|||||||
$faultActor = array();
|
$faultActor = array();
|
||||||
$faultDetails = array();
|
$faultDetails = array();
|
||||||
|
|
||||||
|
$loopType = isset($nameValuePairs['type']) ? $nameValuePairs['type'] : "undefined";
|
||||||
|
$loopName = isset($nameValuePairs['name']) ? $nameValuePairs['name'] : "undefined";
|
||||||
|
|
||||||
while (($argument = $this->args->current()) !== false) {
|
while (($argument = $this->args->current()) !== false) {
|
||||||
$this->args->next();
|
$this->args->next();
|
||||||
|
|
||||||
@@ -125,17 +128,17 @@ abstract class BaseLoop
|
|||||||
/* check if mandatory */
|
/* check if mandatory */
|
||||||
if($value === null && $argument->mandatory) {
|
if($value === null && $argument->mandatory) {
|
||||||
$faultActor[] = $argument->name;
|
$faultActor[] = $argument->name;
|
||||||
$faultDetails[] = sprintf('"%s" parameter is missing', $argument->name);
|
$faultDetails[] = sprintf('"%s" parameter is missing in loop type: %s, name: %s', $argument->name, $loopType, $loopName);
|
||||||
}
|
}
|
||||||
else if($value === '' && !$argument->empty) {
|
else if($value === '' && !$argument->empty) {
|
||||||
/* check if empty */
|
/* check if empty */
|
||||||
$faultActor[] = $argument->name;
|
$faultActor[] = $argument->name;
|
||||||
$faultDetails[] = sprintf('"%s" parameter cannot be empty', $argument->name);
|
$faultDetails[] = sprintf('"%s" parameter cannot be empty in loop type: %s, name: %s', $argument->name, $loopType, $loopName);
|
||||||
}
|
}
|
||||||
else if($value !== null && !$argument->type->isValid($value)) {
|
else if($value !== null && !$argument->type->isValid($value)) {
|
||||||
/* check type */
|
/* check type */
|
||||||
$faultActor[] = $argument->name;
|
$faultActor[] = $argument->name;
|
||||||
$faultDetails[] = sprintf('Invalid value for "%s" argument', $argument->name);
|
$faultDetails[] = sprintf('Invalid value for "%s" argument in loop type: %s, name: %s', $argument->name, $loopType, $loopName);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* set default */
|
/* set default */
|
||||||
|
|||||||
Reference in New Issue
Block a user