Skip to content

Commit

Permalink
Fix exception handle
Browse files Browse the repository at this point in the history
It's not allowed to modify Error
  • Loading branch information
lyrixx committed Nov 15, 2024
1 parent b941f91 commit 60508ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ protected function getDefaultInputDefinition(): InputDefinition
return $definition;
}

private function enhanceException(\Throwable $exception): \Throwable
private function enhanceException(\Throwable $exception): void
{
if ($exception instanceof \Error) {
return;
}

$castorDirs = [
\dirname(__DIR__, 1),
\dirname(__DIR__, 2) . \DIRECTORY_SEPARATOR . 'vendor',
Expand All @@ -148,8 +152,6 @@ private function enhanceException(\Throwable $exception): \Throwable

break;
}

return $exception;
}

private function getLogo(): string
Expand Down
2 changes: 1 addition & 1 deletion tools/release/castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function release(): int
check(
'Check the number of artifacts',
'There are not enough files in the artifacts directory.',
fn () => EXPECTED_ARTIFACTS === count($files),
fn () => EXPECTED_ARTIFACTS === \count($files),
);

check(
Expand Down

0 comments on commit 60508ec

Please sign in to comment.