Also catch in getProvider

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-10-20 10:03:10 +02:00 committed by backportbot-nextcloud[bot]
parent 9a5a80438a
commit b851446c6a

View file

@ -298,9 +298,16 @@ class ProviderFactory implements IProviderFactory {
}
foreach ($this->registeredShareProviders as $shareProvider) {
/** @var IShareProvider $instance */
$instance = $this->serverContainer->get($shareProvider);
$this->shareProviders[$instance->identifier()] = $instance;
try {
/** @var IShareProvider $instance */
$instance = $this->serverContainer->get($shareProvider);
$this->shareProviders[$instance->identifier()] = $instance;
} catch (\Throwable $e) {
$this->serverContainer->get(LoggerInterface::class)->error(
$e->getMessage(),
['exception' => $e]
);
}
}
if (isset($this->shareProviders[$id])) {