@@ -565,6 +565,7 @@ public function authenticate($username, $password)
565
565
}
566
566
try {
567
567
$ this ->getAuthentication ()->authenticate ($ customerId , $ password );
568
+ // phpcs:disable Magento2.Exceptions.ThrowCatch
568
569
} catch (InvalidEmailOrPasswordException $ e ) {
569
570
throw new InvalidEmailOrPasswordException (__ ('Invalid login or password. ' ));
570
571
}
@@ -905,6 +906,7 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, $hash
905
906
throw new InputMismatchException (
906
907
__ ('A customer with the same email address already exists in an associated website. ' )
907
908
);
909
+ // phpcs:disable Magento2.Exceptions.ThrowCatch
908
910
} catch (LocalizedException $ e ) {
909
911
throw $ e ;
910
912
}
@@ -924,6 +926,7 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, $hash
924
926
}
925
927
}
926
928
$ this ->customerRegistry ->remove ($ customer ->getId ());
929
+ // phpcs:disable Magento2.Exceptions.ThrowCatch
927
930
} catch (InputException $ e ) {
928
931
$ this ->customerRepository ->delete ($ customer );
929
932
throw $ e ;
@@ -1026,6 +1029,7 @@ private function changePasswordForCustomer($customer, $currentPassword, $newPass
1026
1029
{
1027
1030
try {
1028
1031
$ this ->getAuthentication ()->authenticate ($ customer ->getId (), $ currentPassword );
1032
+ // phpcs:disable Magento2.Exceptions.ThrowCatch
1029
1033
} catch (InvalidEmailOrPasswordException $ e ) {
1030
1034
throw new InvalidEmailOrPasswordException (
1031
1035
__ ("The password doesn't match this account. Verify the password and try again. " )
0 commit comments