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:
commit
dfae7e9f9d
@ -750,7 +750,6 @@ class Filesystem
|
||||
|
||||
return $result;
|
||||
} catch (\Throwable $e) {
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
\restore_error_handler();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user