]> source.dussan.org Git - nextcloud-server.git/commitdiff
catch specific BadMethodCallException
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 19 Dec 2016 11:01:32 +0000 (12:01 +0100)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 19 Dec 2016 11:01:32 +0000 (12:01 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php

index d9f75fa5a33f9cbcd98058e250e02ea64089d171..ecb16305e925aa4c115b1d5308d6346e57732cc6 100644 (file)
@@ -22,7 +22,7 @@
 
 namespace OCA\TwoFactorBackupCodes\Service;
 
-use Exception;
+use BadMethodCallException;
 use OCA\TwoFactorBackupCodes\Db\BackupCode;
 use OCA\TwoFactorBackupCodes\Db\BackupCodeMapper;
 use OCP\Activity\IManager;
@@ -100,7 +100,7 @@ class BackupCodeStorage {
                        ->setSubject($event);
                try {
                        $this->activityManager->publish($activity);
-               } catch (Exception $e) {
+               } catch (BadMethodCallException $e) {
                        $this->logger->warning('could not publish backup code creation activity', ['app' => 'twofactor_backupcodes']);
                        $this->logger->logException($e, ['app' => 'twofactor_backupcodes']);
                }