4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Finder\Exception;
14 @trigger_error('The '.__NAMESPACE__.'\AdapterFailureException class is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
16 use Symfony\Component\Finder\Adapter\AdapterInterface;
19 * Base exception for all adapter failures.
21 * @author Jean-François Simon <contact@jfsimon.fr>
23 * @deprecated since 2.8, to be removed in 3.0.
25 class AdapterFailureException extends \RuntimeException implements ExceptionInterface
28 * @var \Symfony\Component\Finder\Adapter\AdapterInterface
33 * @param AdapterInterface $adapter
34 * @param string|null $message
35 * @param \Exception|null $previous
37 public function __construct(AdapterInterface $adapter, $message = null, \Exception $previous = null)
39 $this->adapter = $adapter;
40 parent::__construct($message ?: 'Search failed with "'.$adapter->getName().'" adapter.', $previous);
46 public function getAdapter()
48 return $this->adapter;