Skip to content

Commit

Permalink
Use multiple catch
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 23, 2024
1 parent 9b10c04 commit b243cd0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/php/lang/reflection/Method.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ public function invoke($instance, $args= [], $context= null) {
try {
$pass= PHP_VERSION_ID < 80000 && $args ? self::pass($this->reflect, $args) : $args;
return $this->reflect->invokeArgs($instance, $pass);
} catch (ReflectionException $e) {
throw new CannotInvoke($this, $e);
} catch (ArgumentCountError $e) {
throw new CannotInvoke($this, $e);
} catch (TypeError $e) {
} catch (ReflectionException | ArgumentCountError | TypeError $e) {
throw new CannotInvoke($this, $e);
} catch (Throwable $e) {

Expand Down

0 comments on commit b243cd0

Please sign in to comment.