diff options
author | Anna Larch <anna@nextcloud.com> | 2021-06-14 11:25:46 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2021-06-14 11:25:46 +0300 |
commit | cc29931388c6d03f92ccc96da049aa73e94c3974 (patch) | |
tree | e4b97b52481c75edea653be972f55549084961ee /lib/Listener | |
parent | 574f1f010106cb850c6a4f0eeff3a0a815593a10 (diff) |
Wrap Exceptions in ServiceException and remove Throwable
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Listener')
-rw-r--r-- | lib/Listener/NewMessageClassificationListener.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Listener/NewMessageClassificationListener.php b/lib/Listener/NewMessageClassificationListener.php index 56585730c..ea5f8252d 100644 --- a/lib/Listener/NewMessageClassificationListener.php +++ b/lib/Listener/NewMessageClassificationListener.php @@ -32,7 +32,6 @@ use OCA\Mail\Service\Classification\ImportanceClassifier; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; use Psr\Log\LoggerInterface; -use Throwable; class NewMessageClassificationListener implements IEventListener { private const EXEMPT_FROM_CLASSIFICATION = [ @@ -84,8 +83,7 @@ class NewMessageClassificationListener implements IEventListener { $message->setFlagImportant(true); } } - } catch (Throwable | ServiceException $e) { - // TODO: remove Throwable catch once https://github.com/RubixML/RubixML/pull/69 landed here + } catch (ServiceException $e) { $this->logger->error('Could not classify incoming message importance: ' . $e->getMessage(), [ 'exception' => $e, ]); |