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:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-08 17:17:45 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-08 17:18:22 +0300
commit1a03e2d09c051de650a7fc2d5564b69a49575cc3 (patch)
treefa51c0a35db172330fa8ae9b40cfc535e6d84e26 /lib/Listener
parent96b9ea31e3279b2c91e9f9d6a037e91a46181413 (diff)
Also catch throwable's during account sync
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Listener')
-rw-r--r--lib/Listener/NewMessageClassificationListener.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Listener/NewMessageClassificationListener.php b/lib/Listener/NewMessageClassificationListener.php
index 0a8252a92..0f16d21f6 100644
--- a/lib/Listener/NewMessageClassificationListener.php
+++ b/lib/Listener/NewMessageClassificationListener.php
@@ -32,6 +32,7 @@ use OCA\Mail\Service\Classification\ImportanceClassifier;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\ILogger;
+use Throwable;
class NewMessageClassificationListener implements IEventListener {
private const EXEMPT_FROM_CLASSIFICATION = [
@@ -78,7 +79,8 @@ class NewMessageClassificationListener implements IEventListener {
$message->setFlagImportant(true);
}
}
- } catch (ServiceException $e) {
+ } catch (Throwable|ServiceException $e) {
+ // TODO: remove Throwable catch once https://github.com/RubixML/RubixML/pull/69 landed here
$this->logger->logException($e, [
'message' => 'Could not classify incoming message importance: ' . $e->getMessage(),
'level' => ILogger::ERROR,