File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2323use SplFileObject ;
2424use Symfony \Component \HttpFoundation \File \UploadedFile ;
2525
26+ use Throwable ;
27+
2628use function clearstatcache ;
2729use function copy ;
2830use function fclose ;
@@ -96,7 +98,7 @@ public function upload(SplFileInfo $splFileInfo): File
9698 {
9799 try {
98100 $ handledSplFile = $ this ->handleSplFile ($ splFileInfo );
99- } catch (ErrorException $ exception ) {
101+ } catch (Throwable $ exception ) {
100102 throw new UnableToUpload ($ splFileInfo , $ exception );
101103 }
102104
@@ -231,7 +233,7 @@ public function write(MutableFile $file, SplFileInfo $splFileInfo): void
231233
232234 try {
233235 $ splFileInfo = $ this ->handleSplFile ($ splFileInfo );
234- } catch (ErrorException $ exception ) {
236+ } catch (Throwable $ exception ) {
235237 throw FileException::unableToWrite ($ file , $ exception );
236238 }
237239
@@ -281,7 +283,7 @@ public function clear(): void
281283 }
282284
283285 /**
284- * @throws ErrorException
286+ * @throws Throwable
285287 */
286288 private function handleSplFile (SplFileInfo $ file ): SplFileInfo
287289 {
You can’t perform that action at this time.
0 commit comments