8000 Simplify code - catch \Throwable capture all exceptions · symfony/symfony@648c694 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 648c694

Browse files
committed
Simplify code - catch \Throwable capture all exceptions
This is a legacy when we did support PHP 5.X
1 parent da01afa commit 648c694

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ private static function box($func)
750750

751751
return $result;
752752
} catch (\Throwable $e) {
753-
} catch (\Exception $e) {
754753
}
755754
\restore_error_handler();
756755

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ protected function initializeContainer()
487487
$fresh = true;
488488
}
489489
} catch (\Throwable $e) {
490-
} catch (\Exception $e) {
491490
} finally {
492491
error_reporting($errorLevel);
493492
}
@@ -556,7 +555,6 @@ protected function initializeContainer()
556555
try {
557556
$oldContainer = include $cache->getPath();
558557
} catch (\Throwable $e) {
559-
} catch (\Exception $e) {
560558
} finally {
561559
error_reporting($errorLevel);
562560
}

0 commit comments

Comments
 (0)
0