Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit d4c15d1

Browse files
committed
Hide short exception trace by default
1 parent 18a2fcb commit d4c15d1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Command/ServerLogCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
1616
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
1717
use Symfony\Component\Console\Command\Command;
18+
use Symfony\Component\Console\Exception\LogicException;
19+
use Symfony\Component\Console\Exception\RuntimeException;
1820
use Symfony\Component\Console\Input\InputInterface;
1921
use Symfony\Component\Console\Input\InputOption;
2022
use Symfony\Component\Console\Output\OutputInterface;
@@ -78,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
7880
$filter = $input->getOption('filter');
7981
if ($filter) {
8082
if (!class_exists(ExpressionLanguage::class)) {
81-
throw new \LogicException('Package "symfony/expression-language" is required to use the "filter" option.');
83+
throw new LogicException('Package "symfony/expression-language" is required to use the "filter" option.');
8284
}
8385
$this->el = new ExpressionLanguage();
8486
}
@@ -97,7 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9799
}
98100

99101
if (!$socket = stream_socket_server($host, $errno, $errstr)) {
100-
throw new \RuntimeException(sprintf('Server start failed on "%s": %s %s.', $host, $errstr, $errno));
102+
throw new RuntimeException(sprintf('Server start failed on "%s": %s %s.', $host, $errstr, $errno));
101103
}
102104

103105
foreach ($this->getLogs($socket) as $clientId => $message) {

Command/ServerStatusCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\WebServerBundle\Command;
1313

1414
use Symfony\Bundle\WebServerBundle\WebServer;
15+
use Symfony\Component\Console\Exception\InvalidArgumentException;
1516
use Symfony\Component\Console\Input\InputInterface;
1617
use Symfony\Component\Console\Input\InputOption;
1718
use Symfony\Component\Console\Output\OutputInterface;
@@ -73,7 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
7374
} elseif ('port' === $filter) {
7475
$output->write($port);
7576
} else {
76-
throw new \InvalidArgumentException(sprintf('"%s" is not a valid filter.', $filter));
77+
throw new InvalidArgumentException(sprintf('"%s" is not a valid filter.', $filter));
7778
}
7879
} else {
7980
return 1;

0 commit comments

Comments
 (0)