use OCP\EventDispatcher\IEventDispatcher;
use OCP\ILogger;
use OCP\IServerContainer;
+use Throwable;
use function class_exists;
use function class_implements;
use function in_array;
try {
/** @var IBootstrap|App $application */
$apps[$appId] = $application = $this->serverContainer->query($applicationClassName);
- $application->register($context->for($appId));
} catch (QueryException $e) {
// Weird, but ok
+ return;
+ }
+ try {
+ $application->register($context->for($appId));
+ } catch (Throwable $e) {
+ $this->logger->logException($e, [
+ 'message' => 'Error during app service registration: ' . $e->getMessage(),
+ 'level' => ILogger::FATAL,
+ ]);
}
}
}
'message' => "Could not boot $appId" . $e->getMessage(),
]);
return;
+ } catch (Throwable $e) {
+ $this->logger->logException($e, [
+ 'message' => "Could not boot $appId" . $e->getMessage(),
+ 'level' => ILogger::FATAL,
+ ]);
}
}
}