minor #31822 Simplify code - catch \Throwable capture all exceptions (lyrixx)

This PR was merged into the 4.2 branch.

Discussion
----------

Simplify code - catch \Throwable capture all exceptions

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| License       | MIT
| Doc PR        |

---

This is a legacy when we did support PHP 5.X

Commits
-------

648c6949fc Simplify code - catch \Throwable capture all exceptions
This commit is contained in:
Nicolas Grekas 2019-06-03 21:45:55 +02:00
commit dfae7e9f9d
2 changed files with 0 additions and 3 deletions

View File

@ -750,7 +750,6 @@ class Filesystem
return $result;
} catch (\Throwable $e) {
} catch (\Exception $e) {
}
\restore_error_handler();

View File

@ -487,7 +487,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
$fresh = true;
}
} catch (\Throwable $e) {
} catch (\Exception $e) {
} finally {
error_reporting($errorLevel);
}
@ -556,7 +555,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
try {
$oldContainer = include $cache->getPath();
} catch (\Throwable $e) {
} catch (\Exception $e) {
} finally {
error_reporting($errorLevel);
}