catch specific BadMethodCallException

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2016-12-19 12:01:32 +01:00
parent ed4017dfb4
commit 5bad93472d
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8

View 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']);
}