Skip to content

Commit 3e9a18c

Browse files
Merge branch '5.4' into 6.0
* 5.4: [DependencyInjection] Add `SubscribedService` attribute, deprecate current `ServiceSubscriberTrait` usage Use try/finally to restore error handlers Allow serializer default context configuration
2 parents 5e46443 + e5e81a6 commit 3e9a18c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Filesystem.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -705,15 +705,10 @@ private static function box(callable $func, mixed ...$args): mixed
705705
self::$lastError = null;
706706
set_error_handler(__CLASS__.'::handleError');
707707
try {
708-
$result = $func(...$args);
708+
return $func(...$args);
709+
} finally {
709710
restore_error_handler();
710-
711-
return $result;
712-
} catch (\Throwable $e) {
713711
}
714-
restore_error_handler();
715-
716-
throw $e;
717712
}
718713

719714
/**

0 commit comments

Comments
 (0)