Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2021-06-14 11:25:46 +0300
committerAnna Larch <anna@nextcloud.com>2021-06-14 11:25:46 +0300
commitcc29931388c6d03f92ccc96da049aa73e94c3974 (patch)
treee4b97b52481c75edea653be972f55549084961ee /lib/Listener
parent574f1f010106cb850c6a4f0eeff3a0a815593a10 (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.php4
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,
]);