Skip to content

Commit

Permalink
fix: handle throwable error when uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
streamtw committed Apr 3, 2024
1 parent 9975034 commit cb0d0ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Controllers/UploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public function upload()
'trace' => $e->getTraceAsString()
]);
array_push($error_bag, $e->getMessage());
} catch (\Error $e) {
Log::error($e->getMessage(), [
'file' => $e->getFile(),
'line' => $e->getLine(),
'trace' => $e->getTraceAsString()
]);
array_push($error_bag, 'Some error occured during uploading.');
}
}

Expand Down

0 comments on commit cb0d0ba

Please sign in to comment.