Skip to content

Commit

Permalink
Remove InvalidArgumentException because it might not be available in …
Browse files Browse the repository at this point in the history
…symfony/console versions < 2.7
  • Loading branch information
jalogut committed Mar 13, 2017
1 parent 7f30863 commit 52445e9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
namespace Staempfli\Symlinker\Command\Create;

use Staempfli\Symlinker\Helper\FileHelper;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -87,7 +86,7 @@ protected function getFileLines(InputInterface $input)
{
$filePath = $input->getArgument(self::ARG_FILE_PATH);
if (!file_exists($filePath)) {
throw new InvalidArgumentException(sprintf('File not found in %s', $filePath));
throw new \Exception(sprintf('File not found in %s', $filePath));
}
return file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
}
Expand Down Expand Up @@ -118,4 +117,4 @@ protected function getDestPathWithPrefixAppended($path, InputInterface $input)
return $path;
}

}
}

0 comments on commit 52445e9

Please sign in to comment.