]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: remove throwable handling
authorChristopher Ng <chrng8@gmail.com>
Mon, 31 Jul 2023 19:10:50 +0000 (12:10 -0700)
committerChristopher Ng <chrng8@gmail.com>
Thu, 3 Aug 2023 22:30:11 +0000 (15:30 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php
apps/files_reminders/lib/Controller/ApiController.php

index df801cea063692c5634d3ebeaf41256f9a0ee6e7..17b4c90202959a2992966b4d448199c782996862 100644 (file)
@@ -32,7 +32,6 @@ use OCP\AppFramework\Db\DoesNotExistException;
 use OCP\AppFramework\Utility\ITimeFactory;
 use OCP\BackgroundJob\Job;
 use Psr\Log\LoggerInterface;
-use Throwable;
 
 class ScheduledNotifications extends Job {
        public function __construct(
@@ -54,8 +53,6 @@ class ScheduledNotifications extends Job {
                                $this->reminderService->send($reminder);
                        } catch (DoesNotExistException $e) {
                                $this->logger->debug('Could not send notification for reminder with id ' . $reminder->getId());
-                       } catch (Throwable $th) {
-                               $this->logger->error($th->getMessage(), $th->getTrace());
                        }
                }
        }
index af5cc1b32a76724f1518c7a0d814b3ae7639b88d..a0dbd8401114f21b782efff72f1003c4c3df0a55 100644 (file)
@@ -39,7 +39,6 @@ use OCP\AppFramework\OCSController;
 use OCP\IRequest;
 use OCP\IUserSession;
 use Psr\Log\LoggerInterface;
-use Throwable;
 
 class ApiController extends OCSController {
        public function __construct(
@@ -72,9 +71,6 @@ class ApiController extends OCSController {
                                'dueDate' => null,
                        ];
                        return new DataResponse($reminderData, Http::STATUS_OK);
-               } catch (Throwable $th) {
-                       $this->logger->error($th->getMessage(), ['exception' => $th]);
-                       return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
                }
        }
 
@@ -104,9 +100,6 @@ class ApiController extends OCSController {
                        return new DataResponse([], Http::STATUS_OK);
                } catch (NodeNotFoundException $e) {
                        return new DataResponse([], Http::STATUS_NOT_FOUND);
-               } catch (Throwable $th) {
-                       $this->logger->error($th->getMessage(), ['exception' => $th]);
-                       return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
                }
        }
 
@@ -124,9 +117,6 @@ class ApiController extends OCSController {
                        return new DataResponse([], Http::STATUS_OK);
                } catch (DoesNotExistException $e) {
                        return new DataResponse([], Http::STATUS_NOT_FOUND);
-               } catch (Throwable $th) {
-                       $this->logger->error($th->getMessage(), ['exception' => $th]);
-                       return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
                }
        }
 }