pass through ServerNotAvailableException on app init

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-11-14 17:20:14 +01:00
parent 224073ea7b
commit af6c788efc
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 4 additions and 0 deletions

View File

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