Skip to content

Commit a83975f

Browse files
committed
Hide short exception trace by default
1 parent ea50839 commit a83975f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Command/LintCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Symfony\Bridge\Twig\Command;
1313

1414
use Symfony\Component\Console\Command\Command;
15+
use Symfony\Component\Console\Exception\InvalidArgumentException;
16+
use Symfony\Component\Console\Exception\RuntimeException;
1517
use Symfony\Component\Console\Input\InputArgument;
1618
use Symfony\Component\Console\Input\InputInterface;
1719
use Symfony\Component\Console\Input\InputOption;
@@ -119,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
119121

120122
if (0 === count($filenames)) {
121123
if (0 !== ftell(STDIN)) {
122-
throw new \RuntimeException('Please provide a filename or pipe template content to STDIN.');
124+
throw new RuntimeException('Please provide a filename or pipe template content to STDIN.');
123125
}
124126

125127
$template = '';
@@ -155,7 +157,7 @@ protected function findFiles($filename)
155157
return Finder::create()->files()->in($filename)->name('*.twig');
156158
}
157159

158-
throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename));
160+
throw new RuntimeException(sprintf('File or directory "%s" is not readable', $filename));
159161
}
160162

161163
private function validate($template, $file)
@@ -184,7 +186,7 @@ private function display(InputInterface $input, OutputInterface $output, Symfony
184186
case 'json':
185187
return $this->displayJson($output, $files);
186188
default:
187-
throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format')));
189+
throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format')));
188190
}
189191
}
190192

0 commit comments

Comments
 (0)