container->has($handler)) { throw new InvalidArgumentException(sprintf('Invalid exception handler %s.', $handler)); } $handlerInstance = $this->container->get($handler); if (! $handlerInstance instanceof ExceptionHandler || ! $handlerInstance->isValid($throwable)) { continue; } $response = $handlerInstance->handle($throwable, $response); if ($handlerInstance->isPropagationStopped()) { break; } } return $response; } }