If you are not going to do anything with an exception in this catch block, there is no need to enclose the call to the parent method in your own try-catch block. The method automatically passes an exception from the parent implementation if it encounters one outside the try-catch block, just as if you had selected an exception from the same context (as after the if condition):
protected function validate($email)
{
parent::validate($email);
if (!filter_var($value, FILTER_VALIDATE_EMAIL))
{
throw new InvalidArgumentException('etc.');
}
}
source
share