pass through ServerNotAvailableException on app init

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/17954/head
Arthur Schiwon 2019-11-14 17:20:14 +07:00 committed by Backportbot
parent 5ea96c8c3d
commit 700770c95e
1 changed files with 4 additions and 0 deletions

@ -55,6 +55,7 @@ use OC\App\Platform;
use OC\DB\MigrationService;
use OC\Installer;
use OC\Repair;
use OC\ServerNotAvailableException;
use OCP\App\ManagerEvent;
use OCP\ILogger;
@ -153,6 +154,9 @@ class OC_App {
try {
self::requireAppFile($app);
} catch (Throwable $ex) {
if($ex instanceof ServerNotAvailableException) {
throw $ex;
}
\OC::$server->getLogger()->logException($ex);
if (!\OC::$server->getAppManager()->isShipped($app)) {
// Only disable apps which are not shipped