private function getExceptionForPath($path, ValidationException $exception)
{
if ($path === $exception->guessId()) {
return $exception;
}
if (!$exception instanceof self) {
return $exception;
}
foreach ($exception as $subException) {
return $subException;
}
return $exception;
}