Skip to content

Commit 8c14400

Browse files
committed
removed unnecessary rethrow mechanism
1 parent 99a41b8 commit 8c14400

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

app/helpers/MetaFormats/RequestParamData.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,11 @@ public function conformsToDefinition(mixed $value)
6262
return true;
6363
}
6464

65-
///TODO: check whether this works (test the internal exception as well)
66-
// apply validators
67-
// if an unexpected error is thrown, it is likely that the validator does not conform to the validator
68-
// interface
69-
try {
70-
// use every provided validator
71-
foreach ($this->validators as $validator) {
72-
if (!$validator->validate($value)) {
73-
throw new InvalidArgumentException($this->name);
74-
}
65+
// use every provided validator
66+
foreach ($this->validators as $validator) {
67+
if (!$validator->validate($value)) {
68+
throw new InvalidArgumentException($this->name);
7569
}
76-
} catch (InternalServerException $e) {
77-
throw $e;
7870
}
7971

8072
return true;

0 commit comments

Comments
 (0)