diff options
Diffstat (limited to 'lib/Command/Room/Promote.php')
-rw-r--r-- | lib/Command/Room/Promote.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Command/Room/Promote.php b/lib/Command/Room/Promote.php index 3f30621d2..e978e8dae 100644 --- a/lib/Command/Room/Promote.php +++ b/lib/Command/Room/Promote.php @@ -24,12 +24,11 @@ declare(strict_types=1); namespace OCA\Talk\Command\Room; -use Exception; +use InvalidArgumentException; use OC\Core\Command\Base; use OCA\Talk\Exceptions\RoomNotFoundException; use OCA\Talk\Manager; use OCA\Talk\Room; -use OCP\IUserManager; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -79,7 +78,7 @@ class Promote extends Base { try { $this->addRoomModerators($room, $users); - } catch (Exception $e) { + } catch (InvalidArgumentException $e) { $output->writeln(sprintf('<error>%s</error>', $e->getMessage())); return 1; } |