Skip to content

Commit 854f2b2

Browse files
authored
Let exceptions fly while bootstrapping
that way we get a proper exception stacktrace on the CLI
1 parent 4947bba commit 854f2b2

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

src/Command/AnalyseCommand.php

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7777
throw new \PHPStan\ShouldNotHappenException();
7878
}
7979

80-
try {
81-
$inceptionResult = CommandHelper::begin(
82-
$input,
83-
$output,
84-
$paths,
85-
$pathsFile,
86-
$memoryLimit,
87-
$autoloadFile,
88-
$configuration,
89-
$level,
90-
$allowXdebug
91-
);
92-
} catch (\PHPStan\Command\InceptionNotSuccessfulException $e) {
93-
return 1;
94-
}
80+
$inceptionResult = CommandHelper::begin(
81+
$input,
82+
$output,
83+
$paths,
84+
$pathsFile,
85+
$memoryLimit,
86+
$autoloadFile,
87+
$configuration,
88+
$level,
89+
$allowXdebug
90+
);
9591

9692
$errorOutput = $inceptionResult->getErrorOutput();
9793
$errorFormat = $input->getOption('error-format');

0 commit comments

Comments
 (0)