Skip to content

Commit cb0d0ba

Browse files
committed
fix: handle throwable error when uploading
1 parent 9975034 commit cb0d0ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Controllers/UploadController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public function upload()
4141
'trace' => $e->getTraceAsString()
4242
]);
4343
array_push($error_bag, $e->getMessage());
44+
} catch (\Error $e) {
45+
Log::error($e->getMessage(), [
46+
'file' => $e->getFile(),
47+
'line' => $e->getLine(),
48+
'trace' => $e->getTraceAsString()
49+
]);
50+
array_push($error_bag, 'Some error occured during uploading.');
4451
}
4552
}
4653

0 commit comments

Comments
 (0)