Skip to content

Commit bbb636f

Browse files
committed
Leverage non-capturing catches
1 parent 19dbb5d commit bbb636f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ErrorEnhancer/ClassNotFoundErrorEnhancer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private function convertFileToClass(string $path, string $file, string $prefix):
157157

158158
try {
159159
require_once $file;
160-
} catch (\Throwable $e) {
160+
} catch (\Throwable) {
161161
return null;
162162
}
163163

ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ public static function handleFatalError(array $error = null): void
629629
self::$exitCode = 255;
630630
$handler->handleException($fatalError);
631631
}
632-
} catch (FatalError $e) {
632+
} catch (FatalError) {
633633
// Ignore this re-throw
634634
}
635635

ErrorRenderer/SerializerErrorRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function render(\Throwable $exception): FlattenException
6868
'debug' => $debug,
6969
]))
7070
->setHeaders($flattenException->getHeaders() + $headers);
71-
} catch (NotEncodableValueException $e) {
71+
} catch (NotEncodableValueException) {
7272
return $this->fallbackErrorRenderer->render($exception);
7373
}
7474
}

0 commit comments

Comments
 (0)